private void Form1_Click(object sender, EventArgs e) { if (ColorDialog.showDialog() == DialogResult.OK) { BackColor = ColorDialog1.Color } }