Sub Stylize(frm As Form)
Dim Con As Control
For i = 0 To frm.Controls.Count - 1
Con = frm.Controls(i)
If TypeOf Con Is TextBox Then Con.ForeColor = Color.Red
If TypeOf Con Is Button Then Con.FlatStyle = FlatStyle.Flat
Next
End Sub
This is just an example, setting textbox's forecolor to Red, and buttons style to Flat.
Comments