Unicode Controls & Classes for VB6 - Version 4

clsCommDialogs.SetCustomColor Method

Sets a custom color for the Color dialog

Public Sub SetCustomColor (ByVal Index As Integer, _
ByVal Color As Long)
Parameter Description
ByVal Index As Integer The color index (0..15)
ByVal Color As Long The RGB color value
You can customize up to 16 colors, use indexes 0..15 to set or retrieve ([GetCustomColor]) custom colors

Draw a ctlColorWL on a form then paste this code inside
Private Sub Form_Load()
Dim ocd As New clsCommDialogs
ocd.SetCustomColor 0, vbYellow
ocd.SetCustomColor 15, vbGreen
ctlColorXP1.Color = ocd.ShowColor(Me.hWnd, vbRed)
End Sub