|
-
May 27th, 2003, 08:16 PM
#1
Thread Starter
New Member
Window Forms : Status Bar Control ?
I have a class function which is will enabled and disabled button in my window forms. At the same time I will set the windows forms status bar panel text to some text.
Example :
My window forms got 4 button
Button1,Button2 ,Button3,Button4
When Button1 onclick , I will enabled and Disabled Button2 and at the same time I also will enabled Button3 and Button4.
After that I need to set the status bar panel text to:
"MODE : BUTTON1 ONCLICK"
My problem here , is I dono how to set the status bar panel text from my class function.
Who can I help me in this problem?
Thank you ~~
-
May 27th, 2003, 09:26 PM
#2
PowerPoster
First, you need to make your status bar public instead of private.
Next, you need to pass a reference of the form to your class. So in your class constructor, just put something like:
Public MyClass(callingForm As Form1)
When you create the class, include a reference of the form with it.
Dim myClass As MyClass = New MyClass(Me)
Then in MyClass, you can use your forms public status bar.
callingForm.StatusBar1.Text = "Whatever"
Basically it comes down to the fact that you need a reference of the form object in your class somehow.
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
|