Einar,
Shortening it a bit if you don't mind:
System.Drawing.Color.Blue.ToArgb().ToString("x").Substring(2)
PS:I love this method chaining feature.
Cetin
>Bill,
>A little bit of typing will get you the result you want:
>
>System.Drawing.Color myColor = System.Drawing.Color.Blue;
>System.String sColor = myColor.R.ToString("X2") + myColor.G.ToString("X2") + myColor.B.ToString("X2");
>MessageBox.Show(sColor);
>
>
>Hope this helps.
>
>Einar
>
>>This should be a no-brainer and I'm sure I can figure it out (eventually :-) ), but in the interest of expediency, what is the .NET syntax to convert a Color object color value to a hex string?
>>
>>E.g. Color.Blue would be "0000FF"
>>
>>Thanks,
>>Bill