How pass an event to a sub
-
Hi guys. I wanna pass an event to a sub but i dono how to perform it. Some thing like this:
Private Sub Event_Performer (ByVal arg1 as ????) RaiseEvent arg1 End Sub
Would this help? http://www.codeproject.com/vb/net/StepByStepEventsInVBNET.asp
-
Hi guys. I wanna pass an event to a sub but i dono how to perform it. Some thing like this:
Private Sub Event_Performer (ByVal arg1 as ????) RaiseEvent arg1 End Sub
-
Hi guys. I wanna pass an event to a sub but i dono how to perform it. Some thing like this:
Private Sub Event_Performer (ByVal arg1 as ????) RaiseEvent arg1 End Sub
You're can not pass an event. You can, however, pass an event arguments object, or EventArgs. But, depending on what you're really trying to do with this, normally, the only thing that gets the eventargs is the event handler. The handler then picks out what pieces of information it needs and passes those processed pieces to other methods. You would just about never pass an entire eventargs object to a method that is, itself, not an event handler. It looks like you're trying to raise an event, but the parameters in your header are confusing. What are you really trying to do with this code?? Why does this code exist?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Hi guys. I wanna pass an event to a sub but i dono how to perform it. Some thing like this:
Private Sub Event_Performer (ByVal arg1 as ????) RaiseEvent arg1 End Sub