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