Cosmetics for Comman Buttons

  • Thread starter Thread starter mrobyn
  • Start date Start date
M

mrobyn

Guest
Hello all,

I have created my forms and so far so good, but I have these grey (not so cute) command buttons, I can see how to change text color etc... but no place to change the actual color of the comman button itself. Is this possible?If so could youi please point me in the right direction?

Thanks!
 
Not that I know of unless there is a property in vba which I don't know about, I got around it by having a colour scheme for my database that goes with grey
smile.gif
 
Hi, here is a post I remember reading from not too long ago, by AlaskanDad (20-6-2000):

"You cannot change the back color of the Access command button even with code. It doesn't have that property. The trick is to grab some other button looking .gif, .jpg, or .bmp and paste it into the form. You can then put a transparent button on top of it and get the same effect. I've customized many forms this way and they look very non-Access-y."

It's a good idea, I've pulled it off a few times myself...
 
Thank you for the replies, I will try the transparent button idea. Hopefully they will update that part of access in the future! :O)

Robyn
 
One other option is to use a label instead of a command button. To make the label look like a command button set the special effect property to raised then on the mousedown event to change the special effect to sunken and on mouseup back to raised.
 
I like the idea of using a label to create a coloured command button. Could you post a sample code for the Mouse Down and Mouse Up lines. I don't know much VB I'm afraid
 
The code isn't too bad:

Private Sub Labelname_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Labelname.SpecialEffect = 2
End Sub

Private Sub Labelname_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Labelname.SpecialEffect = 1
End Sub

(Let the label/button start out with a raised effect)
 

Users who are viewing this thread

Back
Top Bottom