How set control colors using RGB values

zekeman

Well-known member
Joined
May 23, 2006
Messages
224
Programming Experience
10+
How do I set the color of any control if all I know is the
red, green, and blue integer rgb values?

For example

VB.NET:
dim red,green,blue as integer
red = 100
green = 200
blue = 0

me.backcolor = ????

Thanks
 
I figured out that my project properties has settings which allow me to save the user settings and use them the next time the project runs. So I'm going to check this out and then post back on how it went.
 
I figured out that my project properties has settings which allow me to save the user settings and use them the next time the project runs. So I'm going to check this out and then post back on how it went.

Hopefully in those settings you're planning to just save the user defined "color" and not the individual a,r,g,b values. If not you'd be making a lot of unnecessary work for yourself!

You'll notice you can also specify the object type in the settings. On my user options form I allow the user to choose their color option with the colorpicker dialog and then I store that color in my settings as a "color". The colorpicker allows the user to just select colors rather than attempt to manipulate rgb values.
 
Back
Top