How to set background color of form from ColorDialogBox?

By James J

Set background color of your form using ColorDialogBox...

private void button4_Click(object sender, EventArgs e)
{
            ColorDialog cd =
new ColorDialog();
             cd.
ShowDialog();
            
this.BackColor = cd.Color;
}

How to set background color of form from ColorDialogBox?  (606 Views)