Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to hide a Panel in Windows Forms StatusBar control?

How-to

How to hide a Panel in Windows Forms StatusBar control?

by  PankajBanga  Posted    (Edited  )
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!!!
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top