I have an application where the users can set their own screen colors by using the ColorPickerButton. This includes custom colors outside of the usual "known color" range. The selected color is then stored as an argb number in an XML file which can be read when the screen reloads.
However, the SelectedColor property of the ColorPickerButton appears to convert black to white when displaying the color palette. The following sample code was used to generate the screen shots attached:
Private Sub Form1_Load( _
ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles _
Me.Load
ColorPickerButton1.SelectedColor = Color.FromArgb(255, 255, 255, 255)
' ColorPickerButton1.SelectedColor = Color.FromArgb(255, 0, 0, 0)
End Sub
As you can see both lines of code result in the white colored square being given the focus. Although only a minor problem, black is likely to get heavily used as the color for screen text. The SelectedColor property also appears to work OK with a "KnownColor", but that option is not open to me as users have the choice of potentially 16M colors which are stored as argb's.
I have also noticed that on occasion, other known colors appear to suffer the same problem and although the problem appears random, I suspect that the difficulty with the black/white colors may be the cause.
Any workaround you can provide would be appreciated, otherwise I will create a direct-trac incident if required.
Regards,
Steve Graham
ColorPickerButtonScreenShot_f6d9a589.zip