INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

How-to

How to hide a Panel in Windows Forms StatusBar control? by PankajBanga
Posted: 11 Jun 03 (Edited 12 Jun 03)

You need to set the Width property of the Panel to 0 to hide it.

StatusBar1.Panels(0).Width = 0

Make sure MinWidth property of the Panel you are hiding is set to 0 and AutoSize property to None.

Example: The following code hides the first Panel in the StatusBar when a form loads.

Private Sub onFormLoad(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        StatusBar1.Panels(0).MinWidth = 0
        StatusBar1.Panels(0).AutoSize = StatusBarPanelAutoSize.None
        StatusBar1.Panels(0).Width = 0
End Sub

If you find the sample useful, please don't forget to Rate this and other samples. Your feedback will be much appreciated and valued and will keep me triggering. GOOD LUCK!!!

Back to Visual Basic (Microsoft) VB.NET FAQ Index
Back to Visual Basic (Microsoft) VB.NET Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close