As you noticed, you can't change the background color of a command button from its properties. One thing you could do is make a label and have it raised - change Special Effect in the property of the label to Raised. It should then appear as a command button.
HTH
An investment in knowledge always pays the best dividends. by Benjamin Franklin
Autonumber Description - FAQ702-5106
Thanks HTH, but that didn't quite work the way I wanted. When you try to "click" on the button, it places the cursor inside which is not quite what I'm looking for. I'll just stick with grey...it's not that bad...I was just curious if I was missing a property that could do it.
I am referring to a LABEL, not a text box. I have done it many times and it works. Change the effect to raised, indicate the caption and change the background color.
Maurie
An investment in knowledge always pays the best dividends. by Benjamin Franklin
Autonumber Description - FAQ702-5106
If you want to emulate the full look of a button with your label, use the MouseDown and MouseUp events to change the effect from Raised to Sunken and back.
TadyB---
I get around it by using labels and the following code found on UtterAccess.com, posted by Grove:
I set the Special Effect property to raised. Then with the MouseDown and MouseUp events I add the following Code:
------------------------------------------------------------
Private Sub Label8_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label8.SpecialEffect = 2
Label8.BackStyle = 0
End Sub
------------------------------------------------------------
Private Sub Label8_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label8.SpecialEffect = 1
Label8.BackStyle = 1
End Sub
--------------------------------------------------------------------------------
Didn't get a chance to look at my email until today (1/19/05). I have been tied up with some other things. Won't be able to reply constructively until the middle of Feb. '05. Hopefully, someone else can help follow thru with your delimma.
Good Luck!
Maurie
An investment in knowledge always pays the best dividends. by Benjamin Franklin
Autonumber Description - FAQ702-5106
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.