Public backcolor1 As Color = Color.blue Public bawhite As Color = Color.White Public Sub themes() Me.BackColor = backcolor1 PictureBox1.BackColor = backcolor1 Dim cControl As Control For Each cControl In Me.Controls If (TypeOf cControl Is Button) Then cControl.ForeColor = Color.Black cControl.Font = New Font(cControl.Font, FontStyle.Bold) End If If (TypeOf cControl Is TextBox) Then cControl.ForeColor = Color.Black cControl.Font = New Font(cControl.Font, FontStyle.Bold) cControl.BackColor = bawhite End If If (TypeOf cControl Is CheckBox) Then cControl.ForeColor = Color.Black cControl.Font = New Font(cControl.Font, FontStyle.Bold) cControl.BackColor = backcolor1 End If If (TypeOf cControl Is ComboBox) Then cControl.ForeColor = Color.Black cControl.Font = New Font(cControl.Font, FontStyle.Bold) cControl.BackColor = bawhite End If Next cControl End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)