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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
corvanderlindenConnect With a Mentor Commented:
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
 
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
 
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
All Courses

From novice to tech pro — start learning today.