Thread: String to Color
View Single Post
Old 03-06-2005, 09:53 PM   #3 (permalink)
dhar4dotnet
Registered User
 
Join Date: Mar 2005
Posts: 1
dhar4dotnet is on a distinguished road
Thumbs up (Color) str.ToString() doesn't Work for converting Color into String

Hii,

(Color) str.ToString() doesn't Work for converting Color into String.

Instead,

string strColor = SystemColors.Window;
Color tmpForeColor = Color.FromName(strColor);
button1.ForeColor = tmpForeColor;

This Works fine.
dhar4dotnet is offline   Reply With Quote