Reputation: 12235
I currently load controls at run time, and want to set the color, but not a named color. I was thinking I need to create a color object , set the color of this then assign it, any direction? Thanks
Upvotes: 1
Views: 3444
Reputation: 48098
You can use Color.FromName() method to set colors :
txt.ForeColor = System.Drawing.Color.FromName("#00B300");
txt.ForeColor = System.Drawing.Color.FromName("red");
Upvotes: 1