Using Color Dialog box in winforms

Posted by Madhu.b.rokkam under Windows Forms category on | Points: 40 | Views : 7865
To pop up color picker to pick color from in windows forms Add this code in some event to get that.

Color clr = Color.FromArgb(255, 255, 255);
System.Windows.Forms.ColorDialog colorDlg = new System.Windows.Forms.ColorDialog();
colorDlg.Color = clr;
if (colorDlg.ShowDialog() == DialogResult.OK)
clr = colorDlg.Color;

Comments or Responses

Login to post response