control.BackColor = Color.FromKnownColor(KnownColor.Control)
I found this on:
http://bytes.com/forum/thread654472.html
This blog is a depository for things I have found regarding VB.NET and C#.NET development (and other things I may need to remember). This blog is primarily for my own reference, but if the information I found is useful to others, then that is great. If others want to contribute with comments or other information, then that is great too.
control.BackColor = Color.FromKnownColor(KnownColor.Control)
14 comments:
Excellent thanks
In addition to setting the BackColor back to SystemColors.Control, I found that I also had to set UseVisualStyleBackColor to True to have the button again look as it did by default.
Been looking for this.
Thanks for the info!
Thanks,
It was helpful
saved me lots of time...thanks a lot
This is great for controls like a Button or CheckBox, but controls like a TextBox or ComboBox will need Color.FromKnownColor(KnownColor.Window) (or SystemColors.Window)
It is better to set the BackColor to Color.Empty or simply use control.ResetBackColor()
Thank you very much.
Thanks a lot friend
Thanks a lot, my friend
Thanks. My first hit on that one and got your answer right away!
Try SystemColors.Window which does the same as shorter Term
Thanks!
Thank you!
Still thanking!
And 8 years later, the thanks are still coming in! :)
Post a Comment