473,405 Members | 2,310 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,405 software developers and data experts.

How do i change the forecolor of a command button

can anybody tell me how to change the forecolour of a command button.

Regards
abhay
Apr 3 '07 #1
8 3870
iburyak
1,017 Expert 512MB
Go to Project - Components

Select Sheridan Active Threed Controls.

Use Sheridan button instead to change fore color.

Good Luck.
Apr 3 '07 #2
That doesn't sound like a commonplace ActiveX control. It may only exist on computers with a particular program installation.

There is no ForeColor property for command button controls. There is an article that discusses how to create the effect of another label placed directly over a command control, with forecolour support.

http://vbnet.mvps.org/index.html?cod...ttoncolour.htm

This code is lengthy, and I personally would not use it myself. A simple alternative is to create a picture of your own with text included for the command button; assign the picture to the command button's Picture property; set the Style property to "1 - Graphical"; and make sure that the Caption property is set to null (not used). You may also wish to assign a picture to the button's DownPicture property, which becomes visible when the command button is depressed/pushed down.
Apr 4 '07 #3
iburyak
1,017 Expert 512MB
That doesn't sound like a commonplace ActiveX control. It may only exist on computers with a particular program installation.

There is no ForeColor property for command button controls. There is an article that discusses how to create the effect of another label placed directly over a command control, with forecolour support.

http://vbnet.mvps.org/index.html?cod...ttoncolour.htm

This code is lengthy, and I personally would not use it myself. A simple alternative is to create a picture of your own with text included for the command button; assign the picture to the command button's Picture property; set the Style property to "1 - Graphical"; and make sure that the Caption property is set to null (not used). You may also wish to assign a picture to the button's DownPicture property, which becomes visible when the command button is depressed/pushed down.
Why bother reinventing a wheel?
As I said above he can use Sheridan button instead that has this functionality.
Apr 4 '07 #4
Why bother reinventing a wheel?
As I said above he can use Sheridan button instead that has this functionality.
Could you please provide a link to the where-abouts of this particular ActiveX control that you speak of, so that he may download it? My first statement still stands.
Apr 4 '07 #5
vijaydiwakar
579 512MB
can anybody tell me how to change the forecolour of a command button.

Regards
abhay
for that use form2's componants
Apr 4 '07 #6
iburyak
1,017 Expert 512MB
Could you please provide a link to the where-abouts of this particular ActiveX control that you speak of, so that he may download it? My first statement still stands.

See my first two lines it is included with VB. No download required.


[PHP]Go to Project - Components

Select "Sheridan Active Threed Controls".[/PHP]

I don't think there is any point to continue this discussion because abhayasthana2006 doesn't look to be interested in it any more.
Apr 4 '07 #7
See my first two lines it is included with VB. No download required.


[PHP]Go to Project - Components

Select "Sheridan Active Threed Controls".[/PHP]

I don't think there is any point to continue this discussion because abhayasthana2006 doesn't look to be interested in it any more.
Hmm... just researched your control. Averages $130 to buy, options for 20 day evaluations... definately not something that comes with VB.

http://www.xtras.net/products/activethreedplus/

I wonder how you ever came across it...
Apr 5 '07 #8
simple use API... use changecolor and getcolor function, i cant giv you exactly the code was but i use api to untie the vb limits...follow the steps below..

1. Use FindWindow and FindWindowEx to Get the handle of your button
2. Use GetColor() to get specific Color of your taste
3. Us SetColor to Change the forecolor of your button... just make sure you find the text not the main button object and make sure you pick the right color or you all see is black..or maybe white..
Apr 6 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: codemonkey | last post by:
TIA! I would like to know if there is a way to dynamically change the colors of Subform items? I have already set in place Conditional Formatting so each row has an alernating color scheme, but...
3
by: Nick J | last post by:
Hi, I have seen exampled were if value is > x then change font/colour/etc. How would I go about doing the same except I would like it so that it changes if there is ANYTHING in the text box. ...
6
by: MLH | last post by:
I have a command button with black letters on it. The default value in A97's forecolor property for that button is -2147483630. I didn't choose the color. That was the default when I created the...
4
by: cmrchs | last post by:
Hi, how do you set the ForeColor of a commandbutton, not in VB.NET but in VB 6.0 ? there is no ForeColor-property available !! nor Color or anything sorry for asking in this newsgroup but I...
9
by: matt | last post by:
is it possible to change a setting, such as Forecolor for all text in a form, or do you have to change it for each text block?
0
by: ck.kislay | last post by:
If ,I change the alpha value of forecolor of control like button in VS 2005 then the forecolor didnot show the variation ,forecolor still unchanged while changing the alpha value. I want to show...
3
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when...
7
by: moondaddy | last post by:
in asp.net 2.0, i have a link buttonand want to change the forecolor in a mouse over event. how can I do this? -- moondaddy@noemail.noemail
2
by: annamalainagarajan | last post by:
hi in vb6, i can't to change then forecolor of command button, change the forecolor or changable command button is available .pls give any idea ...... thanks by annamalai
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
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
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
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...

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.