SystemColors.Window to Hex

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,530
Location
Lansing, MI; USA
Programming Experience
10+
I was wondering what the best way to get the value of SystemColors.Window in it's hexadecimal equivalent?

Mind you SystemColors.Window is not a static value, it changes based on the person's windows xp/vista theme and/or the person's windows color scheme (win 95+)
 
VB.NET:
Dim htmlcolor As String = ColorTranslator.ToHtml(SystemColors.Window)
Known color names is returned as the name string when this was the origin, and not a hex number, in this case "window" is a valid color value.
 
Back
Top