Reputation: 12215
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: 3443
Reputation: 48088
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