Display color dialog and get user selection
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
public class Test
{
static void Main()
{
System.Windows.Forms.ColorDialog colorDlg = new System.Windows.Forms.ColorDialog();
colorDlg.AnyColor = true;
colorDlg.ShowHelp = true;
if (colorDlg.ShowDialog() != DialogResult.Cancel)
{
string strARGB = colorDlg.Color.ToString();
Console.WriteLine(strARGB);
}
}
}
Related examples in the same category