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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER