G
Guest
I'm using VB 2005.
When I select a color from the properties window for a control, it returns
an RGB color code (255,255,255). Now, when I attempt to assign a color in
code it is done using the COLOR.COLOROPTION value. How can I take an RGB
color set in the properties window and assign it via code. For example, I
have a control who's color is (192,255,192). I want to be able to also assign
this exact same color via code using the ControlName.BackColor property. I
tried doing ControlName.BackColor = RGB(192,255,192), but I get a message
stating "Value of Type Integer cannot be converted to System.Drawing.Color".
How can I assign an RGB Color to a BackColor via code?
Thanks.
When I select a color from the properties window for a control, it returns
an RGB color code (255,255,255). Now, when I attempt to assign a color in
code it is done using the COLOR.COLOROPTION value. How can I take an RGB
color set in the properties window and assign it via code. For example, I
have a control who's color is (192,255,192). I want to be able to also assign
this exact same color via code using the ControlName.BackColor property. I
tried doing ControlName.BackColor = RGB(192,255,192), but I get a message
stating "Value of Type Integer cannot be converted to System.Drawing.Color".
How can I assign an RGB Color to a BackColor via code?
Thanks.