Link to home
Start Free TrialLog in
Avatar of kautz
kautz

asked on

Status Strip in VB.NET

I just started to fool with VB.NET - I program in other languages.

Curious why this code won't work.  The Status Strip does not update.  It just shows as Gray without any text at all in the form when it displays.  I know the code in this load event is executed as I sat and watched it during debug.  All of this happens, but I get no text. I added the msgbox after setting the text property and there's definitely text in there.  Not sure what keeps the text from showing.

Any ideas?

    Private Sub MainForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        DatabaseLogin.ShowDialog()
        If gConnected = False Then
            MsgBox("You cannot use this program without logging on", MsgBoxStyle.Critical, "Terminating Program")
            Me.Close()
        End If
        StatusStrip1.Text = "Logged in as '" & gUserName & "'"
         MsgBox(StatusStrip1.Text)

        ' Crap I added to try to get the strip to show the message....
        ' I have tried it with various combinations of these and without them
        StatusStrip1.Enabled = True
        StatusStrip1.Visible = True
        StatusStrip1.Refresh()
        Me.Refresh()
        Application.DoEvents()
End Sub
SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kautz
kautz

ASKER

I see, this makes perfect sense, thanks.