I need to acheive something like this :
For i = 0 To veTabSoumission.Items.Count - 1
For Each myControl In veTabSoumission.Items(i).controls
If TypeOf myControl Is CheckBox Then
DirectCast(myControl, CheckBox).Enabled = False
ElseIf TypeOf myControl Is TextBox Then
DirectCast(myControl, TextBox).ReadOnly = True
ElseIf TypeOf myControl Is RichTextBox Then
DirectCast(myControl, RichTextBox).ReadOnly = True
ElseIf TypeOf myControl Is DateTimePicker Then
DirectCast(myControl, DateTimePicker).Enabled = False
ElseIf TypeOf myControl Is ComboBox Then
DirectCast(myControl, ComboBox).Enabled = False
ElseIf TypeOf myControl Is Button Then
DirectCast(myControl, Button).Enabled = False
ElseIf TypeOf myControl Is RadioButton Then
DirectCast(myControl, RadioButton).Enabled = False
ElseIf TypeOf myControl Is PictureBox Then
DirectCast(myControl, PictureBox).Enabled = False
End if
Next
Thanks!!