473,889 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
+ 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 14078
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******** *************@n ews.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.7408 19$oR5.421273@p d7tw3no:
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
3287
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> <input type="radio" name=p2 value=2> <input type="radio" name=p2 value=3> then a text area and a button:
0
1076
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 i came back my command buttons do not work. When i test them on my development computer everything works fine. I rebuild my solution and republish it on the web server and the command buttons stop working. I am using visual studio .net 2003...
1
4216
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 certain fields in a table are a certain value. The buttons are adjacent to each record (i.e. - if there are 5 records, there would be 5 buttons; 10 records, 10 buttons; etc.) Here is the subroutine I've written so far: Public Sub IsButtonVisible()
1
2328
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. The error messages appear when runnign the apend query manually or when closing the form using X, but not when using command buttons. Does anyone know how can the messages be displayed when using command
21
13032
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 Table, Address Book, Airplane to Underline, Undo, Undo (Rewind). I would like to know where they are stored. I thought it might be c:\program files\microsoft office\office\bitmaps but I don't think so. Anybody know where they are stored and...
1
1447
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
4536
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 command set consisting of several single letter commands which take no arguments. A few additional single letter commands take arguments:
2
5267
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 duplicate the action in Access. Chuck
3
1863
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 shorter? like put the etiquettes on the button froma string of '123+456-789*0Cr/' ? problem is the command and lambda-func for each button is different. self.btnDisplay = Button(self,text='1',command=lambda
0
9966
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9810
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11199
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10442
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7997
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7150
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6029
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4647
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 we have to send another system

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.