ColorDialog.CustomColor : ColorDialog « System.Windows.Forms « C# / C Sharp by API






ColorDialog.CustomColor

 
        
using System;        
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;


public class ColorDialogWithCustomColor{

    public static void Main(){
    ColorDialog dlg=new ColorDialog();
    dlg.FullOpen = true;
    // Define the first five of the custom color settings
       // 0xAARRGGBB where AA is alpha, 
                        // RR is red, 
                     // GG is green 
                     // BB is blue 
    // expressed as the hexadecimal byte equivalent
    dlg.CustomColors = new int[5]{0x00ff8040, 0x00c256fe,
               0x00aa2005, 0x0004f002, 0x002194b5};

    dlg.ShowDialog();
  }

}

   
  








Related examples in the same category

1.ColorDialog.AllowFullOpen
2.ColorDialog.AnyColor
3.ColorDialog.Color
4.ColorDialog.FullOpen
5.ColorDialog.MouseDown
6.ColorDialog.ShowDialog()
7.ColorDialog.ShowHelp