Question Hide all elements on Panel

Visible = False

To make the entire panel and everything in it invisible:

VB.NET:
Panel1.Visible = False

If you want the outline of the panel to remain, then first change the BorderStyle to Fixed Single. Then you can make everything inside it invisible:

VB.NET:
        For Each ctl As Control In Panel1.Controls
            ctl.Visible = False
        Next

You could simply disable the controls inside the Panel without making them invisible:

VB.NET:
Panel1.Enabled = False

or

VB.NET:
        For Each ctl As Control In Panel1.Controls
            ctl.Enabled = False
        Next
 
Back
Top