Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

Changing Text Color on a command Button

Is there a way to change the forecolor of a command button text?
0
texasboy
Asked:
texasboy
1 Solution
 
mark2150Commented:
.ForeColor ?


0
 
mark2150Commented:
Hmmm, son-of-a-gun, spoke too soon.

Just checked, the Help says that there should be a .ForeColor property but it doesn't show on the Properties list and generates an error when set programmatically. Looked under the fonts and I can set Bold, Italic, underlined, but no color.

There is a MaskColor and such, but that doesn't effect the text color. Looks like you'ld have to use an API call (if there is one).

Reject me!

M

0
 
dgb001Commented:
Could you use an SSCommand button instead, or use the other Microsoft one (part of Microsoft Forms Controls 2 - or something like that) - I think you should be able to set forecolor on both of those, though each has several different properties. Just a suggestion.
Dave

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
texasboyAuthor Commented:
Doesn't answer my question.
0
 
eyaltilCommented:
You have to Change the Style property of the command to Graphical and then the ForeColor property will be effective
0
 
texasboyAuthor Commented:
that only changes the back color.
0
 
halschCommented:
Hey Tex...
Using "Paint", Create a BMP file the same size as the Cmd button, with the background color the same as the Cmd button BackColor property and type your text(MS San Serif 8 pt) in the desired color. Save the BMP.
Set the "Picture" property of the Cmd button to point to the BMP file you just created.

It's not fancy, but it does work.
Hal
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now