Customized Color Dialog
Imports System
Imports System.Data
Imports System.Windows.Forms
Imports System.Drawing
Public Class MainClass
Shared Sub Main()
Dim dlgColor As System.Windows.Forms.ColorDialog
dlgColor = New System.Windows.Forms.ColorDialog
' Initialize the color dialog's custom colors.
Dim colors() As Integer = { _
&HFF, &H11FF, &H22FF, &H33FF, _
&H44FF, &H55FF, &H66FF, &H77FF, _
&H88FF, &H99FF, &HAAFF, &HBBFF, _
&HCCFF, &HDDFF, &HEEFF, &HFFFF}
dlgColor.CustomColors = colors
dlgColor.Color = Color.Red
If dlgColor.ShowDialog() = DialogResult.OK Then
Console.WriteLine(dlgColor.Color)
End If
End Sub
End Class
Related examples in the same category