先拖一个ColorDialog到窗体中,然后在button1的Click事件中写上: if (MyColorDialog.ShowDialog() == DialogResult.OK) button1.BackColor = MyColorDialog.Color;