Results 1 to 2 of 2

Thread: Window Forms : Status Bar Control ?

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2003
    Posts
    4

    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 ~~

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    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
  •  



Click Here to Expand Forum to Full Width