Answer: Unfortunately, you can't change the back color of a command button. As an alternative, you could create a label and have it behave as a button.
To do this, create a label. Right-click on the label and view its properties.
Set the Back Color property of the label to the color that you want. Then set the Special Effect property to Raised.
Then code it's Mouse Down event to:
[LabelName].SpecialEffect = 2Code the Mouse Up event:
[LabelName].SpecialEffect = 1Code the OnClick event as if it was a command button.
Center the label text horizontally using the text alignment tool button or setting the Text Align property to Center.
If you want to align text vertically, Press Shift + Enter then type in the label text.
It will look and act like a command button.
No comments:
Post a Comment