![]() |
Click here to advertise with us
|
|
|||||||
| Graphics/GDI+ Graphics discussion for VB.NET applications, Winforms, Web, Compact Framework, etc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I want to load a combobox with the web colours - eg. WhiteSmoke, Gainsboro, NavajoWhite.
I know there is a ColorDialog, which has a smaller range of brighter colours. Don't want that. I also know how to fill a combobox with something. How can I get a list of these colours? Thanks in advance. |
|
|||
|
Code:
Dim colorNames As String() = [Enum].GetNames(GetType(KnownColor))
For Each colorName As String In colorNames
Dim _knownColor As KnownColor = DirectCast([Enum].Parse(GetType(KnownColor), colorName), KnownColor)
If _knownColor > KnownColor.Transparent AndAlso _knownColor < KnownColor.ButtonFace Then
ComboBox1.Items.Add(colorName)
End If
Next
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|