Command Buttons background Colour HELP!!

Chow
02-06-2005, 06:02 AM
Im atempting to change the colour of all of the command buttons in my project, i have succesfully managed to do that with the form back colour and the MDI colour. However i cant seem to be able to changet he colour of a command button (using a combo box- with the names of colours being displayed and coding behind it) Which ever colour the user selects and the "Display" button is pressed the command buttons should change colour but they do not.

I have attempted to do it this way:

FrmEditColour.CmdDisplay.BackColor = TxtProjectedCol3.BackColor


(The Cmd Display is the command button)
(The txtProjectedCol3 is a text box with a colour in it- which should make the command button change colour)

Is there anyway of doing this, or have i done something wrong/need to modify my code?

Verphix
02-06-2005, 07:26 AM
To be able to change the backcolor of a command button, set it's 'Style' property to 'Graphical'. Without that, the command button will have the default colours, and you won't be able to add an image to it.

Chow
02-06-2005, 08:02 AM
To be able to change the backcolor of a command button, set it's 'Style' property to 'Graphical'. Without that, the command button will have the default colours, and you won't be able to add an image to it.

Thanks for that it works :D

The only proble i keep getting is that the forms with the command buttons now appear when i click the button, i have put in place the .hide code but the screen flicks, is there away of preventing the forms from appearing without the .hide (as it makes the screen flick.)

Verphix
02-06-2005, 03:49 PM
i don't get your question, maybe you could rephrase your question and explain a little more?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum