Solved

Status Strip in VB.NET

Posted on 2007-11-21
3
11,911 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
3 Comments
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 250 total points
Comment Utility
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 250 total points
Comment Utility
Dim ToolStripStatusLabel1 As New System.Windows.Forms.ToolStripStatusLabel
        StatusStrip1.Items.Add(ToolStripStatusLabel1)
        ToolStripStatusLabel1.Text =  "Logged in as '" & gUserName & "'"
0
 

Author Comment

by:kautz
Comment Utility
I see, this makes perfect sense, thanks.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now