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
|