![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In my program, I have a button that allows the user to change the color of an object by bringing up the standard color selection box. I want this button to reflect the color selected. How may I change the color of the button? I appreciate any help! |
#3
| |||
| |||
|
|
In my program, I have a button that allows the user to change the color of an object by bringing up the standard color selection box. I want this button to reflect the color selected. How may I change the color of the button? I appreciate any help! |
#4
| |||
| |||
|
|
Marium, To qualify what Alfred & Peter stated. If you set the Button's FlatStyle property to System, you will not be able to change the BackColor property of the button, as the System will control it. Just as Alfred stated. If you set the Button's FlatStyle to Standard, Flat, or Sunken, you will be able to change the BackColor property of the Button. Just as Peter stated. You can change the BackColor with FlatStyle.System, its just the button will ignore you. You need to use FlatStyle.System if you want to enable Windows XP themes on your form, via EnableVisualStyles or manifest file. Hope this helps Jay Thanks, Jay! |
#5
| |||
| |||
|
|
-----Original Message----- In my program, I have a button that allows the user to change the color of an object by bringing up the standard color selection box. I want this button to reflect the color selected. How may I change the color of the button? I appreciate any help! . |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
-----Original Message----- Hi, Thank you so much for your answers. I'm using C++. I guess the controls are a bit different from VB, because CButton does not have a .BackColor option (or anything else like it). I'm now using the custom control option to create a CStatic control, but it seems like there's no function to specify its color either. Marium . |
#8
| |||
| |||
|
|
Hi, Thank you so much for your answers. I'm using C++. I guess the controls are a bit different from VB, because CButton does not have a .BackColor option (or anything else like it). I'm now using the custom control option to create a CStatic control, but it seems like there's no function to specify its color either. Marium |
#9
| |||
| |||
|
|
-----Original Message----- "Marium A." <examiners (AT) yahoo (DOT) com> wrote in message news:029301c34c86$1d06a810$a101280a (AT) phx (DOT) gbl... Hi, Thank you so much for your answers. I'm using C++. I guess the controls are a bit different from VB, because CButton does not have a .BackColor option (or anything else like it). I'm now using the custom control option to create a CStatic control, but it seems like there's no function to specify its color either. Marium I'm glad we got that clarified, and that you've received a good answer from Andrew. FWIW, it's not a C++ vs. VB difference, but a MFC vs. .NET framework difference. The procedure I described can be done with equal ease in .NET VB, C# or C++ (in the .NET 2003 Windows Form project template). . |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |