If you need more from a StatusBar than either the native VFP or the MS StatusBar ActiveX control can offer, then creating your own InterNet Explorer style statusbar is not as difficult as you might imagine.
What this statusbar will not do is display the messages from a VFP menu.
What it will do is a whole lot more than the alternatives and is only really limited by your imagination as a developer!
In the following example a simple five panel statusbar bar is created.
Panel 1 - Bitmap + line of text
This is used to display a 16 x 16 bitmap and text string relative to the control passed over by the mouse, or any other bitmaps/messages you programatically send.
Panel 2 - Progressbar
This displays the progress of processing within a loop
Panel 3 - AVI Player
This displays 16 x 16 .avi files
Panel 4 - Time display
Time including seconds, (if you don't already have a timer running, you will need to add one)
Panel 5 - Date display
The example comes from an MDI form which sits at the bottom of _SCREEN, so to include the statusbar in a form, you simply replace the _SCREEN references with THISFORM.
The panels are containers with the following non-default properties
.Height = 20 .SpecialEffect = 1
The containers for panels 1 - .cntPanel1, 2 - .cntPanel2 and 3 - .cntPanel3, each have a form method relative to the container, .mCntPanel1(), .mCntPanel2() and .mCntPanel3().
File names, messages etc are passed to the controls in the container through the methods as parameters.
The .Resize() event of the form adjusts the positions of the containers relative to the width of the form. The width of .cntPanel1 is adjusted relative to the width of the remaining space in the statusbar.
The code and controls required for the progressbar can be found in FAQ184-2366
You will not find many 16 x 16 .avi files but making your own is easy.
Let's assume you want the print icon or the save icon to flash during an operation. In animation terms you could use two bitmaps, a 16 x 16 bitmap with an image and 16 x 16 bitmap without an image. The player continuously plays the sequence and thus the display flashes, until told to stop.
To show the .avi file you need the OleClass MSComCt2.Animation.2 control to be found in the list of ActiveX controls. To be able to create .avi files, download the freeware AviCreator 1.5 to be found through any Internet search engine.
If you don't want to take advantage of the possibilities presented by using the animation control, a simple workaround is to use an image control instead and use the timer event to toggle the .Visible property. This will cause the image control to appear/disappear every second.
The sizing of the controls is important - I suggest you use MS Sans Serif fontsize 9 for the labels and 16 x 16 for the image and olecontrol. The texbox use for the progressbar should be the same size as its container.
So how do you send messages to the statusbar?
In the .MouseEnter() or .MouseMove() event of a control such as a commandbutton of a toolbar, put :-