473,395 Members | 1,437 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Graphic Button

Hi All, I'm having a hard create a command button with a background in color
other than "ButtonFace" and a foreground text in different color other than
black. Is there a way to paint command buttons to have background in any
color and foreground text in any other color.... thanks all.
Jul 17 '05 #1
4 7202
> Hi All, I'm having a hard create a command button with a background in
color
other than "ButtonFace" and a foreground text in different color other than black. Is there a way to paint command buttons to have background in any
color and foreground text in any other color.... thanks all.


Setting the BackColor is easy... change the CommandButton's Style property
to 1-Graphical.

As for the ForeColor, that's not so easy. See these links...

http://vbnet.mvps.org/code/subclass/buttoncolour.htm

http://vbnet.mvps.org/code/intrinsic...colorcheck.htm

Rick - MVP
Jul 17 '05 #2
Hi, It is very simple:

1- Open a project.
2- Click on Project --> Components
3- Under Controls tab, select Microsoft Forms 2.o Object Library
4- Click on Apply
5- Add a Command Button (from the new added controls) to your form and
change the backcolor and fore color properties.

Good luck,
Hajir

"News Central" <Ba*@Bay.com> wrote in message
news:QZ********************@baytsp.com...
Hi All, I'm having a hard create a command button with a background in color other than "ButtonFace" and a foreground text in different color other than black. Is there a way to paint command buttons to have background in any
color and foreground text in any other color.... thanks all.

Jul 17 '05 #3
> Hi, It is very simple:

1- Open a project.
2- Click on Project --> Components
3- Under Controls tab, select Microsoft Forms 2.o Object Library
4- Click on Apply
5- Add a Command Button (from the new added controls) to your form and
change the backcolor and fore color properties.
To the original poster... Don't Do This!

To Hajir... You might want to read this

INFO: Usage and Redistribution of FM20.DLL
http://support.microsoft.com/support.../Q224/3/05.ASP

Rick - MVP

"News Central" <Ba*@Bay.com> wrote in message
news:QZ********************@baytsp.com...
Hi All, I'm having a hard create a command button with a background in

color
other than "ButtonFace" and a foreground text in different color other

than
black. Is there a way to paint command buttons to have background in any
color and foreground text in any other color.... thanks all.


Jul 17 '05 #4
Thanks Rick ... I am not a fan of using FM20.DLL but just thought it would
be an easy way to have control on ForeColor. Once I had a problem with that
dll while distributing my application I got Error 7 and I stopped using it.

"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message
news:Ab********************@comcast.com...
Hi, It is very simple:

1- Open a project.
2- Click on Project --> Components
3- Under Controls tab, select Microsoft Forms 2.o Object Library
4- Click on Apply
5- Add a Command Button (from the new added controls) to your form and
change the backcolor and fore color properties.


To the original poster... Don't Do This!

To Hajir... You might want to read this

INFO: Usage and Redistribution of FM20.DLL
http://support.microsoft.com/support.../Q224/3/05.ASP

Rick - MVP

"News Central" <Ba*@Bay.com> wrote in message
news:QZ********************@baytsp.com...
Hi All, I'm having a hard create a command button with a background in

color
other than "ButtonFace" and a foreground text in different color other

than
black. Is there a way to paint command buttons to have background in any color and foreground text in any other color.... thanks all.



Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Racket | last post by:
Buttons down the left A, B, C, D A graphic to the right. As you hover over A or B etc the graphic on the right changes. It's a common one. Need a script to do this, with or without...
0
by: David | last post by:
I am using CGI.pm and GD to make a page that generates a diagram based on some form input. The problem I have is under IE (Netscape seems to work correctly) the new graphic that is generated is not...
11
by: laredotornado | last post by:
Hello, Is it possible, instead of having the button "Browse" for the HTML <input type="file"> element, to have a graphic in its place? How would this be done? Thanks, - Dave
2
by: David Scemama | last post by:
Hi, I'm looking for a way to display semi graphic characters in a multi line text control or in a rich text control. I've tried with all the characters of the extended ASCII table (code page...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
1
by: ray well | last post by:
hi, i need to give the user the ability to extract a rectangular area of their choice from a graphic displayed in a picture box to the clipboard, so they can use it elsewhere. say the graphic...
6
by: randy1200 | last post by:
I'm using Visual Studio 2005 and C#. I need to print a WinForm used for data entry as a graphic. In other words, I need to print the exact WinForm the user sees on the screen. I searched through...
4
by: André | last post by:
Hi, I try to create and render a graphic among other objects like e.g. tables, labels, buttons. The tables are not a problem, neither the graphic. My problem is that i can't render both...
13
by: Prisoner at War | last post by:
I know about the * * style="cursor: pointer; cursor: hand;" * * attribute of the <imgtag, but is there a way JavaScript can "load in" one's own graphic for such events?? How? TIA!
7
by: Gregor Kofler | last post by:
Prisoner at War meinte: (a) This has nothing to do with JS. (b) This is not a fallback. You just overwrite your custom-pointer property with the standard one. In your case you will *always*...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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
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...

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.