Archive

Archive for the ‘Uncategorized’ Category

May
26

I often refer developers to the Solution Samples and the Fox Foundation Classes (FFC) to see how things can be accomplished with Visual FoxPro. I have read Doug Hennig’s articles on mining the gold out of the FFC and sat in on his sessions on the same subject. I believe these two resources are under utilized by many Fox developers. I might not use the classes directly (although I have from time-to-time), but the concepts and fundamental code is all there for the taking. There is some really cool code in the samples.

This month I got to leverage a class I have wanted to use since seeing it in the VFP 8.0 beta, but have not had a reason to do so until this month. I am not sure who wrote the System Tray Icon class, but they did a spectacular job on it. As is documented in the class: this is pure magic with a combination of Windows API calls and the BINDEVENT() function.

The concept is simple: display an icon in the system tray (AKA: the Windows Taskbar Notification Area). The icon handles events for the double-click and right-click so the user can interact with the icon with an optional menu, or run a process, or display a form or report. Optionally you can inform the user of events or actions taken via a balloon tip and/or a tool tip.

Like all the VFP Solution Samples, the System Tray Icon class comes with a sample to demonstrate how you work with the class. I was able to study the solution sample and get the class operational in short order. The sample uses a form and has the system tray object dropped on the form. I did everything in code:

goSysTray = NEWOBJECT(“SysTray“, “SysTray.vcx“)

goSysTray.IconFile = “Graphics\SystemTrayApplet.ico
goSysTray.TipText = “Process Runner Status”
goSysTray.MenuText = “menus\SysTrayShortcut.mpr
goSysTray.MenuTextIsMPR = .T.
goSysTray.MenuOffsetFromRight = 100
goSysTray.AddIconToSystray()
.
.
READ EVENTS

There are numerous ways to create a menu. I created a shortcut menu complete with icons. My menu starts and stops a Windows Service, opens a top-level form, and shuts down the system tray applet. My application has a CONFIG.FPW compiled in it (file not excluded) to ensure the VFP frame does not display, a FoxUser.DBF file is not created, and some general house cleaning is handled.

SCREEN = off
RESOURCE = off
HELP = off
MVCOUNT = 1200
TITLE = Process Runner
BITMAP OFF

Since the status form is a top-level form it gets displayed on the Windows Desktop and it looks like a professional application to the end users.

Once and a while I will surf through the Solution Samples and FFC (via the Component Gallery) to see what is there and to take a peek at the code if I have time. The reason is probably obvious: if a client calls me and asks me if I can do something like X and I have not done it before, but can recall seeing it in the Solution Samples or FFC, I can tell them it is feasible. In the case of this project, when the client asked if he could have an icon in the system tray to show a form with the status of his process running as a Windows Service I was able to say “sure, no problem.”

If you are looking for the System Tray Icon solution sample just start up the Task Pane Manager, click on the Solution Samples, and look under the New in
Visual FoxPro 8.0 grouping. I am not sure I would have been able to put this class together in a weeks worth of hours. Thanks to whoever put this together. You made me look real good to my client and saved him a bunch of development time and money he can use on other parts of his project.

May
25

There is no time like the present to get signed up for FoxForward, with the early bird deadline approaching in a few hours. You can register with a simple four step process so head over to the FoxForward.net and get going. Clocks are ticking…

, ,

May
25

Some days I feel exactly like today’s Dilbert

May
24

As you might know, I hate cars. The are a necessary evil in my life, but at least I don’t have to hassle long when buying one. I just completed the negotiation to get my next vehicle in about 2 hours. This is how it went.

1) Ring – Hi Rick, I see your lease is up in two months so we can pull you ahead and have GMAC pay your last two payments. Have you considered what you want for your next car?

2) Hi Randy, yes, I want a solid car with good gas mileage and I want it for less than I am paying today for my 2004 Grand Prix. Price me out a G6, a Vibe, and a Grand Prix.

3) Ha, ha, ha. OK, but the requirement for the lower price might be tough unless you are willing to give up the V6 engine, and maybe a comfortable drive, but let me get back to you.

I go over to the local dealer and check out the new G6 since I have not driven one yet. I figured moving to a smaller car was the only way I was going to go down on the monthly payment. What a disappointment. The G6 drives nice enough if you get the V6, but the gas mileage is the same as the bigger Grand Prix. The price difference is $40 a month in favor of the G6. Nuts.

Two hours later…

4) Rick, you are not going to believe this, but GM just came out with an additional rebate on the Grand Prix this afternoon which means your payment is going down by $10 a month as long as you can live with red, white or silver.

5) I wanted blue, but red will do. So I pick the Grand Prix. They both get the same mileage (20 in the city, 30 on the highway), they are within $7 a year overall for insurance, and the now the lease payment is like $5 a month different.

6) Done. When do you want to stop by and pick it up? I assume you still have the FoxPro license plate, right?

7) Of course I still have the FoxPro license plate {g}. How is tomorrow for the pickup?

I really like having a friend who owns a car dealership. I have only purchased/leased one car in the last 15 years or so where I actually went to a dealership before making the purchase and haggled with a salesperson. When he was in Indiana he had drivers drop off the new car where I was working that day. Now I can drive to the other side of Detroit to pick it up. I also know I am not getting shafted, which is something I always felt before my friend owned a dealership.

So I did not intend on getting a new car when I woke up this morning, but the deal is done and I will pick it up tomorrow.

May
23

A day of .NET for Rick? I can here the rumors already – Rick has completely moved his operations to .NET. Nope, but I took the opportunity to get a day of free seminars on some topics I was interested in in Grand Rapids last Saturday. You will see by the sessions I picked that they are Web related and something I think .NET is very strong and well suited for in today’s projects. All the sessions were scheduled for 60 minutes, most ran over, and some of the sessions did not have any break time between them. It was almost as if the original schedule had less sessions for 75 minutes each and they had to be crammed in to fit the one day conference.

The day was organized by the West Michigan .NET User Group, sponsored by several local companies and one very large national company with a vested interest in spreading the word about .NET. I also got a chance to take my son with me so he could get a little taste of the Microsoft vision. He is a Web developer and he gets the LAMP vision at school. He sees how .NET could be in his future, but has not seen it much at the University of Michigan. He also understands how school is way different from the real world.

The keynote was very interesting. It was about the Future of Development. The speaker talked about how data will be accessible on all platforms (server, desktops, laptops, PDA, phones, toasters (okay, I added the last one)). It was not a discussion of the paperless office promised by so many years ago. Rather it was a discussion on how our users will want to get their data in non-traditional ways. The speaker sort of reminded me of Tom Rettig. This made me wonder what Tom might be blogging about today if he were alive.

Next up was the “Building a .NET Startup.” I think this session would have been better titled “How to Design and Build an ASP.NET Application.” What Brian Anderson showed is how he designed, architected, and developed a Web site that allows someone to invoice people for money and allow the people to pay via cash or through a PayPal account. This is designed for people who run a soccer team and need to collect money from the parents to run the team, or a scout leader who needs to collect dues for the child’s participation (or similar scenario). The Web site charges a little fee for each transaction. It gives you the ability to manage the people and what each owes. Nice little site. Brian built the site using the Microsoft AJAX Toolkit, .NET Tiers and Codesmith frameworks/code generators, and the PayPal Payment Pro Web service integration to process the PayPal transactions. His basic premise with respect to the frameworks and code generation tools is to never write CRUD code. I talked to him after the session about the lack of optimization code generators are famous for. He said I might be surprised on how far tools like this have come. Lots of links and lots ideas on how one can rapidly put together a .NET site. Very good session.

Daniel Woolston presented the “AJAX Controls” session. This session went through some of the 32 controls in the Microsoft AJAX Toolkit. Dan started out the session with a comment that I will paraphrase as “I really have no idea how this session is going to go because I have not rehearsed it.” With this in mind, I was pleasantly surprised how smooth the presentation went. Some of the controls in this toolkit are extremely cool. The AJAX Control Toolkit is from Microsoft and is open source, and is free. The project is hosted on CodePlex like VFPX is and is community driven. The controls also play nice with other frameworks and look easy to implement. I am most interested in the Accordion, the Calendar, the Always Visible, and Resizable controls for a project I have coming up. He also gave away Nerf toy guns at the end of his session (not technically important, but I think as a bribe to get better evals {g}). Excellent session.

The next session was called Command Patterns by Martin Shoemaker. I have seen Martin present before and his session was on the Command design pattern, While I was interested in what he had to say, I have seen some great design pattern sessions by VFP speakers who cover several design patterns in one session. So I bailed early and visited with the different vendors. I actually learned a lot from the vendors with respect to the Michigan economy and how .NET developers are seeing a growing market again here in Michigan. One of the companies described how they lived through a down turn in the software industry after Y2K, but how in the last year it really is rebounding. This is exactly what I have experienced, only my rebound has been going for the last three years. They did mention how their consulting practice and head hunting is seeing a real drive for C# developers as opposed to VB.NET developers. It is only one company’s perspective, but interesting nonetheless. They are also seeing a lot more VB6 to VB.NET conversions than they have in the last few years.

Jim Holmes kicked off my afternoon with his “Real World MOSS” session. Jim shared his real world experience working with Microsoft Office SharePoint Server and the tools he uses to make development and deployment easier. This really is my kind of session as Jim detailed shortcomings and workarounds to increase productivity. One of the cooler tools he showed is Watir Recorder. This tool records clicks and keystrokes in Internet Explorer so you can rerun unit and system tests for a Web application. In this particular case Jim uses this tool to deploy SharePoint features. There are a number of steps you need to process to unregister (for lack of the exact term) and re-register the SharePoint feature. He automated all of it using the Watir Recorder. Very cool session. I learned more about SharePoint in this one hour than I did at the entire Advisor Summit.

Dan Hibbitts presented the “Mobile Software Factory” which covered the .NET Compact framework and SQL Server CE. I am sure I cannot deploy an application on my Treo anytime soon, but this informative session did get me geeked to try something on this platform down the road. So much to learn, so little time to do it all. This is one of the things that has me interested in Christof’s Guineu project. As a VFP developer I have little to no capabilities to develop for this platform. I have one customer who is thinking this platform might be the next big thing for him so I am trying to expand my skill to possibly meet his needs. Another good session.

The last session of the day was “Vista Gadgets” by Microsoft Developer Evangelist Drew Robbins. I have seen Drew present a few times before and there is no mistaken that he loves his job and feels like he is one of the luckiest guys in the world. Drew showed us some of the available Vista Gadgets and then built a practical one. Now I will admit when I first saw these gadgets a couple if years ago I was not impressed by them. I found them more than a little distracting. I like a clean desktop for the most part and these gadgets are anti-organizing from my perspective. My view on this has been changing more and more as I see some real and practical implementations. I really don’t need a fancy clock or the weather in my face. Drew put together a fairly simple gadget that read your tasks in Outlook and presented them on the desktop outside of Outlook. Even better, you could complete them and create detailed fly outs with very simple and easy to understand javascript code with a little HTML. I see some advantages to some dashboard type of applications where this might have some practical implementations for business. Thanks Drew.

One other general observation: most of laptops at the seminar were running Vista. This is completely different from the laptops I have seen at Fox events. Interesting. I talked to several attendees about this and they are “struggling” to adopt Vista, but overall they are liking it.

Overall it was a day well spent. Sure it was a Saturday and I had to cross the state to attend, but I would have traveled much further for this kind of value. I wanted to attend the one in Ann Arbor put on by the AA .NET group because it was closer to home, but it was held during the Advisor Summit. Sounds like the two groups are helping each other and are planning several of these a year. Looks like I might be scheduling a couple more Saturdays a year to career development.

, , ,

May
18

I want to make sure to thank the newest sponsors of Southwest Fox who recently signed up:

DBi Technologies (Gold)
Moxie Data (Silver)
Micromega Systems (Gold)

I think it is very important to recognize the companies who are supporting the conference and the Fox Community. All three new sponsors are going to be vendors at the show too. Each of these companies (along with our first set of sponsors West Wind Technologies, Stonefield Query, Tomorrow’s Solutions LLC, and White Light Computing) have really stepped up and helped us out, and each have offered to do more if asked.

We have a lot of people already registered and the deadline for the early-bird registration is still more than a month away. This is very exciting and very encouraging since we only expected a couple of people to register right away and the bulk to register closer to the deadlines.

May
11

Traditions are important and Advisor was able to keep my streak alive by scheduling me for the first session on the last day. As I have mentioned in this blog before, for some reason (guarantee that I will be sober) the organizers always pick me to present first in the morning. I talked about VFPX in my session “Learn How to Use VFPX Tools and Components for Visual FoxPro.” I felt this session went well and the feedback was very positive. Doug Hennig mentioned it might have been the most attended session of the conference. It is always nice to hear people are interested in your presentation, but more importantly, people are interested in VFPX and the future of Visual FoxPro.

The rest of the morning was consumed with email and following up on customer issues as I listened to Doug’s always good session on Integrating RSS and VFP. It was unfortunate, but I had to skip Tamar’s Solve Common Problems with VFP SQL. I will catch up by doing some homework and reading her white paper.

After lunch I attended Kevin’s session on the “COM Cookbook: Five Tasty Recipes for COM Automation with VFP.” Kevin went through five examples:

  1. Desktop Alerts
  2. Wrapper for VFP Encryption DLL by Craig Boyd
  3. Wrapper for VFP compression DLL by Craig Boyd
  4. VFP mail using Blat.DLL
  5. VFP Application Updater

Kevin showed the feared “Catastrophic failure” error message he had when he demoed the Desktop Alerts at the Detroit Area Fox User Group in the “Why not COM” section. He covered the fundamentals and some of the complicated things like debugging.

My last session (“Expand Your SQL Server Toolkit for the VFP Developer”) kicked off the VFP Track “overtime.” You see the rest of the conference was over after the desert reception, but the VFP track had two extra sessions for the attendees. Not bad since I was getting paid time and a half (1.5 * $0.00) {g}. This session covers a number of different categories of developer tools developers should consider to make their SQL Server experience better. I demo tools like SQL Compare, SQL Doc, MSDE Admin, and SQL Prompt. I have purchased and use these tools on a regular basis to increase my productivity and improve my profitability.

Doug Hennig wrapped up the conference with his really good session “Best Practices for Vertical Market Applications.” I have seen this session at GLGDW and OzFox in the last year, but I listened because Doug tweaks it and attendees participate with their own thoughts on the various topics. This time around I took a couple of notes for a project I am working on right now for another developer.

After the conference wrapped up we went out to dinner at Ruth’s Chris Steak House. Dinner was excellent, conversation was enjoyable and surprise-surprise we were the 1000th customer of the newly opened restaurant. What a hoot, dinner was on the manager! Later, Jeanine (who attended the VFP track) admitted she worked with the manager to set the whole thing up and bought us all dinner. After dinner we headed back to the hotel where we chatted some more.

I got to bed around 1:30 and was up at 3:30 for my early flight home. My flight from LA to Minneapolis was horrible as the guy next to me was sleeping and kept invading my personal space. From the airport I drove directly to the Detroit Area Fox User Group meeting where we held a meeting of open discussion and I ended up not having to present. It is good to be home.

, ,

May
09

Tuesday is a busy and very long day here in Anaheim. Lots of news from LA area with the fires, but it is northwest from where we are.

The first session of the day is Kevin Ragsdale’s “Best Practices for Deploying Visual FoxPro Applications.” You should be aware of my passion for the topic since I helped write the book Kevin used as part of his research on the topic. He formally recognized the work Rick Borup and I did on the Deploying Visual FoxPro Solutions book he considers essential reading (I agree {g}). He also recognized the work Rick Borup did at GLGDW 2006 on the same topic. Kevin then went through several best practices and shared his deployment successes and failures. One of the things I like to do is learn from other people’s mistakes so I can avoid them, especially with deployment. Kevin made several excellent points during the session and I thought he did a good job. Several people talked to me about our book after the session. It is nice to get the word out about it.

The next session I attended was suppose to be “Simple SharePoint Solutions”, but it was replaced with “Customized SharePoint Sites with ‘Features’.” The two presenters got together a decided the timing should be switched. I was curious more about the solutions, so I bailed out after a short time and went to get some work done. I have already seen Tamar’s session called “Practical Tips for Working with Existing Visual FoxPro Code” before, but I am going to read her white paper because I am living this with a new customer and their FoxPro DOS code. I hope they will move to VFP and SQL Server some day.

After lunch (which several people did not like, but I enjoyed because there were lots of veggies) I skipped Doug’s session on Inno Setup because I have seen it a couple of times already. It is a great session. You can read some of the material in the last couple issues of Advisor Guide to Microsoft Visual FoxPro. It is a fantastic session. The first time I attended I was making changes to my scripts in the session.

Up next was my session “Microsoft VFP Debugging Essentials.” I was not happy with the delivery of this session at all and it was reflected in a couple of the evals. I did not have the energy I normally like to deliver because I had a headache that made me feel dizzy while I was presenting. I was able to communicate, but as one eval correctly stated: “This was not one of Rick’s best sessions.”

The last session of the regular day was Tamar’s “The Why and How of Test Data.” This was another session I was really looking forward to before the conference and is one we selected for Southwest Fox 2007. Tamar shows you why and how to auto generate test data using third-party tools, and her own framework. I have a real need to generate some test data for a couple of projects I am working on so I can use this session as soon as I return home. Highly recommended session.

Right after Tamar’s session we were picked up and attended the LA Fox meeting out by LAX. This was fun. We listened to an interesting presentation by a couple of guys from GeneXus. GeneXus is a suite of development tools that generate applications from it own IDE into source code in VFP, .NET, Java, and several other platforms I cannot recall. At the same time it generates the application it generates the database in VFP, SQL Server, MySQL, and many other popular database backends. It definitely looks like an interesting product. The thing I like about it is the one source (they call the source code a KnowledgeBase) and many different “buzzword compliant platforms.” I was curious what target platform has the best performance, but they did not have any metrics. I have always been skeptical about code generators, but this one definitely looks like it is mature. The product has been around since 1988 and is very current. I am still skeptical, and the cost is a little steep (US$5000), but looks very powerful at the same time.

We had a good view of the fires in LA from the office where the LA Fox meeting takes place and watched it while we ate pizza during the break.

Following the presentation from GeneXus, Tamar, Doug and I did our 20-minute mini-sessions. Tamar demonstrated an app she is working on and how she is using GDIPlusX from VFPX to capture screens shots and print them on a VFP report. I covered Southwest Fox and the user group offer we are doing, and rapidly went through some of the VFPX projects in a quick overview. Doug followed me with part of his VFP and Vista session. It was a fun night. We got back to the hotel around 11:30 and I rehearsed my morning session before hitting the pillow.

More to come…

, ,