ColorDialog.AnyColor : ColorDialog « System.Windows.Forms « VB.Net by API






ColorDialog.AnyColor

  

Imports System.Drawing
Imports System.Windows.Forms

public class ColorDialogProperty
   public Shared Sub Main
        Dim ColorDialog1 As ColorDialog = New System.Windows.Forms.ColorDialog
        Dim objSelectedColor As Color
        'Dim aryColors() As Integer = {222663, 35453, 7888}
        Dim aryColors() As Integer = {Math.Abs(Color.Gray.ToArgb), _
              Math.Abs(Color.Navy.ToArgb), _
              Math.Abs(Color.Teal.ToArgb)}

        With ColorDialog1
            .Color = Color.Blue
            '.AllowFullOpen = False
            .FullOpen = True
            .AnyColor = True
            .CustomColors = aryColors
            .SolidColorOnly = True
        End With

        If ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
            Console.WriteLine(ColorDialog1.Color)
        End If

   End Sub
End class

   
    
  








Related examples in the same category

1.ColorDialog.AllowFullOpen
2.ColorDialog.Color
3.ColorDialog.CustomColors
4.ColorDialog.FullOpen
5.ColorDialog.ShowDialog()
6.ColorDialog.SolidColorOnly