颜色管理通用对话框 colorDialog
/// <summary> /// 更改颜色 /// </summary> private void RoomState_GetColor() { //btnApply.Enabled = true; if (colorDialog1.ShowDialog() == DialogResult.OK) { intRoomStateColor = colorDialog1.Color.ToArgb();//将选中颜色转换为ARGB值 btnColor.BackColor = Color.FromArgb(intRoomStateColor);//将ARGB颜色值转换为btnColor控件的背景颜色 } }