|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
user control and eventsHi,
I've got a user control with a method called Collapse. I would like that when this method is called (it's only called inside the user control, never by the client), an event can be caught. So my client form can catch an event such as OnCollapse. HOw can I do that ? Syntax ? Thx Hi in your usercontrol declare OnCollapse as a public event
Public Event yourEvent() Then inside the method collapse call the event with raiseevent like this: RaiseEvent OnCollapse Now on your form your usercontrol has got an extra event, called OnCollapse which you can catch Hth Greetz Peter -- Show quoteHide quoteProgramming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. "Sam" <samuel.berthe***@voila.fr> schreef in bericht news:1120123299.493726.31210@z14g2000cwz.googlegroups.com... > Hi, > I've got a user control with a method called Collapse. I would like > that when this method is called (it's only called inside the user > control, never by the client), an event can be caught. > So my client form can catch an event such as OnCollapse. > HOw can I do that ? Syntax ? > > Thx > Hi,
Add an event to the usercontrol that you raise in collapse procedure. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vastmEvent.asp Ken --------------------- "Sam" <samuel.berthe***@voila.fr> wrote in message I've got a user control with a method called Collapse. I would likenews:1120123299.493726.31210@z14g2000cwz.googlegroups.com... Hi, that when this method is called (it's only called inside the user control, never by the client), an event can be caught. So my client form can catch an event such as OnCollapse. HOw can I do that ? Syntax ? Thx
Check if Stored Procedure already exists in Access Database?
"Selecting" from a data table Strangest damn error - database at fault? WebBrowser control error Adding desktop shortcuts and start program entries ApplicationDomains Calculating Time in VB .Net How to use OCX? Directinput Dir Function just stopped working! |
|||||||||||||||||||||||