Convert color to string

To convert a color to a string use the ColorConverter class but this can be access through TypeConverter class;

  1. Dim myColor as Drawing.Color = Color.Red
  2.  
  3. Dim clor As System.ComponentModel.TypeConverter = System.ComponentModel.TypeDescriptor.GetConverter(myColor)
  4. dim ColorName as string
  5.  
  6. ColorName = clor.ConvertToString(Color.Red)

, ,

  1. No comments yet.
(will not be published)
Submit Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Subscribe to comments feed

SetPageWidth