Saturday, April 19, 2008

How to change forecolor of commandbutton in VB

There is no property of command button through we can change its fore color. fore color means the color of the text in the command button. but there is a trick for doing this.

1. Make a command button.
2. Go to properties of the button n in style select graphical instead of standard.
3. Now use paint to make a small picture os the text u want to be displayed
in the command button.
4. Now come back to properties n in picture property of command button
browse n give the path of the paint file u created.
5. u r done.


that's the simple trick without any scripts n codes.
njoy!!

No comments: