Adding an event

I have a button named button1. I am wondering how to add an event to the button. I want to change the colour of the text of the button when the mouse is over it and when it is off of it. For this i have a user control. I just need to know how to add an even to the command button. Aswell, how do I change the colour of the caption of a command button. Thanx
eltontennisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HazeCommented:
well, you can change hte colour of hte caption of the command button by adjusting hte properties values on the right of the programming interface.. or at least, thats how to do it for mine... =P
0
corvanderlindenCommented:
You cannot just add an event to an intrinsic control.
You could encapsulate your button control in a class, and in this class write code that raises an event when the mouse is over the button.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HazeCommented:
corvanderlinden, you can add an event to a command button..
0
HazeCommented:
i'm sorry, i should say, i think there is a way, coz i heard of it before...
0
VbmasterCommented:
Here's a already done usercontrol you can use, with the capabilities you asked for. ;)

http://www.qtm.net/~davidc/zips/xdwbutton.zip
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.