By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,096 Members | 1,264 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,096 IT Pros & Developers. It's quick & easy.

How do i change the forecolor of a command button

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

Regards
abhay
Apr 3 '07 #1
Share this Question
Share on Google+
8 Replies


iburyak
Expert 100+
P: 1,017
Go to Project - Components

Select Sheridan Active Threed Controls.

Use Sheridan button instead to change fore color.

Good Luck.
Apr 3 '07 #2

P: 31
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
Expert 100+
P: 1,017
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

P: 31
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
100+
P: 579
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
Expert 100+
P: 1,017
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

P: 31
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

P: 27
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

Post your reply

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