README.md

December 4, 2022 · View on GitHub

Command Button - Change Forecolor (Trick!)

Description

Ever wanted to give your boring Command Buttons a different text color? Here's your chance ;)

More Info

Submitted On
ByKevin
LevelBeginner
User Rating4.6 (46 globes from 10 users)
CompatibilityVB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
CategoryCoding Standards
WorldVisual Basic
Archive File

Source Code

 
Change the forecolor of a "Command Button"...
1) Add a check-box on your form and rename it to "Command1"
2) Set it style-property to "1 - Graphical"
3) Add the following code to "Command1_MouseUp"...

Command1.Value = 0

Of course you could also use the hard-way, But I'd prefer this way.
A check-box supports the same events anyway...

I hope you liked this small trick.
Kevin,