Is there a way to list all the System.Drawing.Color's?

MiserableMad

Active member
Joined
Feb 2, 2007
Messages
25
Programming Experience
Beginner
I found out how to use a txtbox.Text to change the Me.Backcolor...
VB.NET:
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] Color.FromName(txtMain.Text).IsKnownColor [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Try
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].BackColor = Color.FromName(txtMain.Text)
[/SIZE][SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception
MessageBox.Show(ex.Message)
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Try
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE]

But is there a way to list all the colors as well?
 
Back
Top