|
-
Apr 2nd, 2001, 02:47 PM
#1
Thread Starter
New Member
I am currently writing a client application (a chat program) and have a status bar at the bottom that gives you your connection status ... somewhat similar to yahoo messenger ... yellow when connecting, and green when connected. The code I have to do this is
StatusBar.Panels(1).Picture = LoadPucture(" ....\PATH")
StatusBar.Panels(1).Text = "Connecting"
I want to modularize this so instead of all this code I could just have something like SB1.connecting() and have the statusBar show up with the connecting image (yellow image). I am very new to VB and any help I could get would be greatly appreciated. Thank you.
Dhiren
-
Apr 2nd, 2001, 04:37 PM
#2
Member
I haven't tested what it is you are doing, but here is how you would set it up:
1) Add a Standard Module to your project
2) Add a public procedure to the module:
Public Sub ShowConnecting(ByVal SB1 As StatusBar)
With SB1
.Panels(1).Picture = LoadPicture(" ....\PATH")
.Panels(1).Text = "Connecting"
End With
End Sub
3) In the code that keeps track of what is going on, update the status bar by calling the procedure in the module and passing the name of your status bar:
ShowConnecting SB1
4) Create one procedure for each "look" you want and call them according to what's going on.
If at first you don't succeed...
-
Apr 3rd, 2001, 09:58 AM
#3
Thread Starter
New Member
asdf
Hey thanks for your input ... it worked.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|