Event Handling..

bri189a

Senior Contributor
Joined
Sep 11, 2003
Messages
1,004
Location
VA
So apparently I can't:

this.Load += new Blah... which pressing tab will automatically insert the correct signature and code later in the page.

now it appears I'm going to need to memorize the signature of events since I won't have it typed for me automatically anymore... what is the VB short cut... ie how can have intellisense continue to do the signature automatically for me:

Private Sub Page_Unload([I need intellisense to do something here for the signature]) Handles MyBase.Unload
 
Well I found that by going to the events drop down and selecting an event that hasn't been implemented yet it does the same thing (puts the function and signature in for me)... there has to be better a way though.
 
Since most things are declared WithEvents, you can select the object from the upper left combo box. Then, you select the event that you wish to use from the upper right combo box.

WithEvents simply allows you to get events from these two boxes and allows you to use the Handles keyword after your subroutine.
While not identical to C#, it does help you get lots of events quickly functional.

If your variable is not declared WithEvents, you'd have to memorize the delegate signature. :)
 
Back
Top