Display color dialog and get user selection : Color Dialog : GUI Windows Form C# Source Code


Custom Search

C# Source Code » GUI Windows Form » Color Dialog »

 

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);
      }

    }

  }


           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo GUI Windows Form
» Color Dialog