Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing the colour of a command button

Status
Not open for further replies.

technohead

Technical User
Jan 12, 2002
64
0
0
US
hi i'm just wondering what do you do to change the colour od a command button???
 
Hi There,

In your properties window for the command button, change the style property to 1-Graphical and Change your BackColor Property to whatever you like.

You can also change the color programmatically:

Command1.Backcolor = RGB(122,23,44)

Hope this helps.
 
If you want to change the text colour as well, and don't mind foregoing the accelerators and fancy 3d effects, you might consider using a label instead... I've done that one on occasion.
 
Hi
If you want to change the color of the text

setbutton cmdName.hWnd, vbred
cmdName.refresh


Tane **** Keep it simple ***
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top