views:

161

answers:

1

For example, you can type this.Loaded += in C# and press TAB a couple of times to automatically generate an event handler. Is there an equivelent in Visual Basic?

Typing Addhandler Me.Loaded and pressing TAB or RETURN does nothing.

A: 

The VB.NET IDE has a different approach, inspired by the WithEvents keyword. Note the two combo boxes at the top of the editor window. You select the (class Events) in the upper left, the event you want to subscribe in the upper right combo. That auto-generates the event handler, it has the Handles keyword.

No help for explicit AddHandler statements that I know of.

Hans Passant