Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Status Strip in VB.NET

Posted on 2007-11-21
3
Medium Priority
?
12,140 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
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 tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

609 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