how to set a default event on a user control

B

Brian Henry

when you have a user control on a form and double click it, it creates code
to handle its default event "Load" how can i change this so if i double
click a user control on a form that it will take by default the event I
specified as the default one? thanks!
 
H

Herfried K. Wagner [MVP]

Brian Henry said:
when you have a user control on a form and double click it, it creates
code to handle its default event "Load" how can i change this so if i
double click a user control on a form that it will take by default the
event I specified as the default one?

\\\
<DefaultEvent("Tick")> _
Public Class...
///
 
A

Armin Zingler

Brian Henry said:
when you have a user control on a form and double click it, it
creates code to handle its default event "Load" how can i change
this so if i double click a user control on a form that it will
take by default the event I specified as the default one? thanks!


<System.ComponentModel.DefaultEventAttribute("MyEvent")> _
Public Class UserControl1

End Class



Armin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top