Use
System.Windows.Forms.Control.BackColor
and
System.Windows.Forms.Control.ForeColor
. There are read/write properties, so you can modify background or foreground color of any control (it includes
Form
) at any time. Assignment of the color (
System.Drawing.Color
) will automatically invalidate the control's rendering, so all you need is assignment:
myButton.BackColor = System.Drawing.Colors.Wheat;
—SA