You can set the visible properties of the controls by setting it to true the same way.VB Code:
'Hides the control with the specified control-name. For Each cont As Control In Me.Controls If cont.Name = "the name of the control" Then cont.Visible = False End If Next 'Hides all Lable controls on the form. For Each cont As Control In Me.Controls If cont.GetType.Name = "Lable" Then cont.Visible = False End If Next 'Hides all the controls. For Each cont As Control In Me.Controls cont.Visible = False Next
Not these does not hide controls that are in a container! These are fine for your project since you don't have controls in a container.




Reply With Quote