473,480 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 14022
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3243
by: Oscar Monteiro | last post by:
I Have to sets of Radio buttons like so: <input type="radio" name=p1 value=1> <input type="radio" name=p1 value=2> <input type="radio" name=p1 value=3> <br> <input type="radio" name=p2 value=1>...
0
1055
by: Kevin McLean | last post by:
I have serveral ASP web pages containing command buttons that perform different functions. This web site has been running for serveral months without any problems. I had taken a vacation and when...
1
4184
by: PCB | last post by:
Hi all, Not sure if this is possible, but can I change the controls of a command button on a per record bases in a subform. In my case, I would like to make a command button visible only if...
1
2290
by: bjbounce2002 | last post by:
Hello, I am using forms with command buttons to close form or run action queries. The error messages such as "Null value in required field" or "duplicate value in primary key" are suppressed....
21
12972
by: MLH | last post by:
If I choose a command button on a form in design view, open the properties box and click the Picture property and its wiz button, I'm presented with a lengthy list of pictures. Everything from Add...
1
1428
by: vitaminB18 | last post by:
i want to make my command buttons unique...like instead of having a simple command buttons i want to change its image into something nice to see....
13
4473
by: Chris Carlen | last post by:
Hi: Having completed enough serial driver code for a TMS320F2812 microcontroller to talk to a terminal, I am now trying different approaches to command interpretation. I have a very simple...
2
5245
by: Chuck | last post by:
How can I make an array of command buttons (or toggle buttons) on a form and have a text box on the same form display the index of the button clicked? This works very well in VB6, but I can't...
3
1844
by: skanemupp | last post by:
is there anyway to make this shorter? i hate having these big blocks of similar-looking code, very unaesthetic. maybe doesnt matter good-code-wise? anyway can i make some function that makes this...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7045
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7087
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6741
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6944
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4483
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2985
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
182
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.