?
Solved

Status Strip in VB.NET

Posted on 2007-11-21
3
Medium Priority
?
12,102 Views
Last Modified: 2008-02-01
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
0
Comment
Question by:kautz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 1000 total points
ID: 20332323
this won't work, the status strip is empty. Add a status label inside it, using the form designer, and change the text of the status label.

0
 
LVL 18

Accepted Solution

by:
armoghan earned 1000 total points
ID: 20333480
Dim ToolStripStatusLabel1 As New System.Windows.Forms.ToolStripStatusLabel
        StatusStrip1.Items.Add(ToolStripStatusLabel1)
        ToolStripStatusLabel1.Text =  "Logged in as '" & gUserName & "'"
0
 

Author Comment

by:kautz
ID: 20342172
I see, this makes perfect sense, thanks.
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question