Color Dialog with custom color settings : ColorDialog « GUI « VB.Net Tutorial






Imports System.IO
Imports System.Windows.Forms

public class ColorDialogWithCustomColorSettings
   public Shared Sub Main
      Dim ColorDB As New ColorDialog()

        ColorDB.CustomColors = New Integer() _
        {&HFF00FF, &HFF0000, &HF0F0F0, &HF0F0F0, _
         &HAAAAAA, &HBBBBBB, &HCCCCCC, &HDDDDDD, _
         &HEEEEEE, &HAAA0A0, &HBBB0B0, &HCCC0C0, _
         &HDDD0D0, &H111111, &H333333, &H888888}

        If (ColorDB.ShowDialog() = DialogResult.OK) Then
            Console.WriteLine(ColorDB.Color)
        End If

   End Sub
End class








14.67.ColorDialog
14.67.1.Set ColorDialog propertiesSet ColorDialog properties
14.67.2.ColorDialog: Named Color or R G B valueColorDialog: Named Color or R G B value
14.67.3.Use Color Dialog to set ColorUse Color Dialog to set Color
14.67.4.Color Dialog with custom color settings