Currently I am using this code to convert my RGB string to a color to set as a the background for a Text Box.
ColorConverter colorConverter = new ColorConverter();
colorTextBox1.BackColor = (Color)colorConverter.ConvertFromString(displayColor);
But I get this error when I run this code.
when the value of displayColor = "#16776960"
.
An unhandled exception of type 'System.ArgumentException' occurred in System.Windows.Forms.dll
Additional information: Control does not support transparent background colors.
Any idea on how I can take out transparency from the color?
All I want it to do is make the background of the text box that color.