Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Status Bar traffic lights 1

Status
Not open for further replies.

zimmer9

Programmer
Jan 12, 2005
66
0
0
US
I just added a Microsoft StatusBar Control (ActiveX Control version 6.0 (class MSComctlLib.SBarCtrl.2) to the bottom of 1 of my forms.

How would I go about getting traffic light picture icons and paint the status bar red, yellow or green. I wanted to make the status bar green for informational messages, yellow for warning messages and red for error messages.

I did reference a prior question that was raised on this vey issue and I saw examples such as:

PUBLIC oGreenLight
STORE LOADPICTURE('TRFFC10A.ICO')
THISFORM.oleStatusBar.panels(1).Picture = oGreenLight

Where could I get traffic lights icons ?

Is STORE LOADPICTURE a valid statement in ACCESS ?

 
Do a Google search for traffic lights, you'll find what you want. To get help on the Status bar control, goto the HELP folder under your Windows (WINNT) folder. You'll should see a help file named cmctl198.chm.

To see what the various properties and methods are for a Status bar control, dim a variable as Statusbar within a module. Like this;

Dim abc as StatusBar

Now, after you type abc. Access will display a list of properties/methods from which to choose.

Bascially, what you are going to want are 3 traffic lights. One greeen, one red, and one yellow. To change the picture within the panel of a Status bar, issue code something like this:

abc.Panel.item(1).Picture = "\\path\trafficlight
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top