469,323 Members | 1,560 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

How to make Command Buttons 'pretty'???

Is there a way to change the background color of command buttons? I
know that I saw some VBA code somewhere that showed how to do this. I
think it involved making the button transparent and then creating a box
the same size and making it have a color for the background. Although,
I can't visualize the logic or how to kick off the 'click' event with
this overlay sitution. Ok ... I am rambling.

Does anyone have the answer to this one? Thanks much.

Sue
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
8 13448
On 11 Jun 2004 14:06:07 GMT, Susan Bricker wrote:
Is there a way to change the background color of command buttons? I
know that I saw some VBA code somewhere that showed how to do this. I
think it involved making the button transparent and then creating a box
the same size and making it have a color for the background. Although,
I can't visualize the logic or how to kick off the 'click' event with
this overlay sitution. Ok ... I am rambling.

Does anyone have the answer to this one? Thanks much.

Sue

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!


There are several options.
1) You can use MSPaint to create either a picture or a color
background, and use that as the command button's 'picture' property.

2) You can use a new label, with whatever color you wish. Use the
Label's Mouse Down and Mouse Up events to change it's special effects
to Raised or Sunken. The label will have a click, so code it just as
you would a command button.

3) See http.www.lebans.com for Stephan Lebans method.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2
Hi Susan,

No, there's no easy way to make the standard grey buttons look *pretty*.
With a bit of smoke and mirrors however you can achieve some nice results.
Here's some pretty buttons I cooked up in an Access 97 database to mimic the
Windows XP look and feel.
http://www.infoplan.com.au/images/prettybuttons.jpg (screenshot 85k)

Here's the database for download so you can take a look at the code and see
how it works
http://www.infoplan.com.au/zip/prettybuttons97.mdb (Access 97 Database -
650k)

Hope this helps.

Regards ----- Terry

"Susan Bricker" <sb****@att.net> wrote in message
news:40*********************@news.newsgroups.ws...
Is there a way to change the background color of command buttons? I
know that I saw some VBA code somewhere that showed how to do this. I
think it involved making the button transparent and then creating a box
the same size and making it have a color for the background. Although,
I can't visualize the logic or how to kick off the 'click' event with
this overlay sitution. Ok ... I am rambling.

Does anyone have the answer to this one? Thanks much.

Sue
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 13 '05 #3
Access has nothing built-in to allow for changes in the command button
backcolor. There are some third-party tools that may help:

A shareware version of Button Painter for MS Access is available at
this web site: http://www.peterssoftware.com/bp.htm

Some simple colored button examples that can be copied into your
application are available at: http://www.peterssoftware.com/clrbtn.htm

Stephen Lebans has an example database that shows how to set a command
button back color and more: http://www.lebans.com/cmdbutton.htm

There are nice "Color Command Buttons" downloads at this site:
http://www.candace-tripp.com/access_downloads.htm

Hope this helps,

--
Peter De Baets
Peter's Software - MS Access Tools for Developers
http://www.peterssoftware.com
Susan Bricker <sb****@att.net> wrote in message news:<40*********************@news.newsgroups.ws>. ..
Is there a way to change the background color of command buttons? I
know that I saw some VBA code somewhere that showed how to do this. I
think it involved making the button transparent and then creating a box
the same size and making it have a color for the background. Although,
I can't visualize the logic or how to kick off the 'click' event with
this overlay sitution. Ok ... I am rambling.

Does anyone have the answer to this one? Thanks much.

Sue
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #4
Access has nothing built-in to allow for changes in the command button
backcolor. There are some third-party tools that may help:

A shareware version of Button Painter for MS Access is available at
this web site: http://www.peterssoftware.com/bp.htm

Some simple colored button examples that can be copied into your
application are available at: http://www.peterssoftware.com/clrbtn.htm

Stephen Lebans has an example database that shows how to set a command
button back color and more: http://www.lebans.com/cmdbutton.htm

There are nice "Color Command Buttons" downloads at this site:
http://www.candace-tripp.com/access_downloads.htm

Hope this helps,

--
Peter De Baets
Peter's Software - MS Access Tools for Developers
http://www.peterssoftware.com
Susan Bricker <sb****@att.net> wrote in message news:<40*********************@news.newsgroups.ws>. ..
Is there a way to change the background color of command buttons? I
know that I saw some VBA code somewhere that showed how to do this. I
think it involved making the button transparent and then creating a box
the same size and making it have a color for the background. Although,
I can't visualize the logic or how to kick off the 'click' event with
this overlay sitution. Ok ... I am rambling.

Does anyone have the answer to this one? Thanks much.

Sue
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #5
> Susan Bricker <sb****@att.net> wrote in message news:<40*********************@news.newsgroups.ws>. ..
Is there a way to change the background color of command buttons? I
know that I saw some VBA code somewhere that showed how to do this. I
think it involved making the button transparent and then creating a box
the same size and making it have a color for the background. Although,
I can't visualize the logic or how to kick off the 'click' event with
this overlay sitution. Ok ... I am rambling.

Does anyone have the answer to this one? Thanks much.

Sue

Sue,
I always create a label with the background color, font, and
caption I want to see. Then I put a transparent button over top of
the label. Make is exactly the same size as the label. You cannot
see the command button but when you click on it, it works like any
other button. (It looks like you are clicking the pretty label )
I usually give the label a solid black border and use the
"raised" effect to help it look more like the button it is pretending
to be.
In design mode, the button will look like a see-through
rectangle. Drag it over top of the label and make your you use "Bring
to Front" under "Format" so the transparent button ends up on top.
Hank Reed
Nov 13 '05 #6
You don't say what version of ms-access you are using.

If you are using a2003, and turn on themed controls, then you will get a
fresh new looking application without doing anything.

The controls are slightly rounded,and they highlight when your mouse is held
over them.

Take a look at the following screen shots, they are with themed controls.
(there is actually one screen shot with the themes turned off, and this will
give you an idea of what I mean).

......
http://www.attcanada.net/~kallal.msn/Articles/Grid.htm
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
http://www.attcanada.net/~kallal.msn
Nov 13 '05 #7
Here is some screen shots of thems turned on..and thems turned off...

http://www.attcanada.net/~kallal.msn/Atheme/index.htm
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
http://www.attcanada.net/~kallal.msn
Nov 13 '05 #8
"Albert D. Kallal" <Pl*******************@msn.com> wrote in
news:TbRyc.740819$oR5.421273@pd7tw3no:
Here is some screen shots of thems turned on..and thems turned
off...

http://www.attcanada.net/~kallal.msn/Atheme/index.htm


Does MS not know that most people who know how turn off the Luna
skin and revert to the classic UI, because of the vast performance
increase you get as a result?

And, BTW, many parts of Access 2K look just like the themed version
when run under Windows XP (because the widgets are supplied by the
OS).

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Oscar Monteiro | last post: by
reply views Thread by Kevin McLean | last post: by
13 posts views Thread by Chris Carlen | last post: by
3 posts views Thread by skanemupp | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.