Himanshu Himanshu - 3 years ago 146
Vb.net Question

Error converting set statusbarPanel text from VB6 to VB.NET

I have a code in VB6 as follows:

stbStatusBar.Panels("MONITOR").Text = "Monitor Initializing"

Now I'm converting code into VB.NET as follows:

stbStatusBar.Items.Item("MONITOR").Text = "Monitor Initializing"

But it doesn't set any values. Any help would be appreciated.

Answer Source

Although it is hard to understand code from just one line, I think you forgot to name your Statusbar Panel in designer form in VB.NET.

Check If any panels with name "SERVER" exist. If not you should name it as follows:

stbStatusBar_Panel.Name = "SERVER"

And then add panel in statusbar.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download