Visual FoxPro 8 offers many new features and opportunities to make life easier.
by Rick Strahl
May 20, 2003
Page 1 of 3
isual FoxPro 8 offers full support for themes and the XP style look. Unfortunately the Windows Common Control OCX that ships with VFP 8 doesn't support this same look. This article describes how to build a status bar control that looks and behaves like an XP style status bar, using several new features of VFP 8.
One of the really cool features of VFP 8 is its ability to work with Windows Themes and provide fully themed user interfaces. Some people say that XP themes are nothing more than fancy window dressing that suck up CPU cycles and screen real estate, but once you start using themes it's hard to look back on the classic Windows interface and not have it feel archaic.
Visual FoxPro 8 now supports fully themed controls for all of its own native controls. Unfortunately, the same is not true of the Common Controls ActiveX controls (MSCOMCTL.OCX) that many of us use to build enhanced user interfaces for our users. Even when using a Manifest file (see sidebar), the various controls such as the TreeView, ListView, StatusBar, ProgressBar and others do not inherit the Windows XP look and feel and instead render in the 'classic' style, which looks a little bit funky when you run them inside an otherwise themed application. To me this is most noticeable with the StatusBar control, which gives away a non-XP compliant application immediately.
It's too bad we have a nice XP style interface for our forms but are stuck with StatusBars, TreeViews, and ListViews that are stuck in the 'classic' era.
What's Wrong with MSCOMCTL StatusBar?
The StatusBar ActiveX control has always had a number of problems. The most obvious is that the StatusBar does not properly show the sizing grip even when you enable the sizing grip in the control. Well, it doessometimes. If you define the control in code and add it to the form and run it in an MDI form inside of the main VFP or another Fox application window, then it works. But in a Top Level Form the sizing grip never shows. Many of us have gotten around this by utilizing an image and embedding it on the StatusBar (see Figure 1).