How can i change textbox BackColor in code-behind to something like this:
Textbox1.BackColor = "#F2F0E1
instead of
Textbox1.BackColor = System.Drawing.White
To change the background color, select the form in Visual Studio and locate the BackColor property in the Properties panel. There are a number of ways to specify a color. Color by name - Simply type in a color name into the BackColor value field (for example Red, Yellow, Cyan etc).
You could try something like:
Textbox1.BackColor = System.Drawing.ColorTranslator.FromHtml("#F2F0E1");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With