Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Usercontrol: How to add Click Event 1

Status
Not open for further replies.

knuckle05

Programmer
Joined
Dec 17, 2001
Messages
247
Location
CA
Hi All,

I have a user control for which I would like to add a Click event.

How can I make VB fire an event when a user clicks on my custom control?
 
When you say "My" custom control, I am assuming you mean one you have the code to?

If that is the case, I would just suggest using the ActiveX control wizard to add the click event to the control, and mapping it to the control itself. This will put code like this in the declarations section for your user control.

Event Click() 'MappingInfo=UserControl,UserControl,-1,Click

So that when the user clicks on your control, it will raise a click event in VB for that control.

Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top