颜色管理通用对话框 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控件的背景颜色
            }
        }

 

posted @ 2013-01-14 20:03  qin孑  阅读(218)  评论(0编辑  收藏  举报