Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
For Each ctrl As Control In Me.Controls
Select Case ctrl.GetType
Case GetType(TextBox)
Dim myCurrentControl As TextBox = CType(ctrl, TextBox)
myCurrentControl.Visible = Not myCurrentControl.Visible
Case GetType(Label)
Dim myCurrentControl As Label = CType(ctrl, Label)
myCurrentControl.Visible = Not myCurrentControl.Visible
Case GetType(ListBox)
Dim myCurrentControl As ListBox = CType(ctrl, ListBox)
myCurrentControl.Visible = Not myCurrentControl.Visible
Case GetType(ListView)
Dim myCurrentControl As ListView = CType(ctrl, ListView)
myCurrentControl.Visible = Not myCurrentControl.Visible
Case Else
'Case GetType(etc)
End Select
Next
End Sub
End Class