Overriding Events in VB.NET

Back in the day, you use to be able to override an event in VB by using the drop down list in the code window.  Today, I had a friend who is moving from visual studio 2003 to visual studio 2008 ask me, “How do I override events in VB.NET now?”  All you get in the drop downs now is the event handlers.

Well, I’ll be honest here.  I had no idea that was even an option.

It turns out that the best way to automatically override events using VB.NET now is to make use of the intellisense everywhere feature.

If you type in, “prot”, you can select “protected” from the list.  Press the space bar and then type in “overr” and select “overrides” from the list.  One more space and the list of overridable functions appear.  Select one and press tab to get the function all stubbed out for you.

It’s not quite the same, but I think in the end it may actually be faster than using the drop down list boxes at the top of the edit screen.

Related Post

Leave a Reply

Comment Policy:

  • You must verify your comment by responding to the automated email that is sent to your email address. Unverified comments will never show.Leave a good comment that adds to the conversation and I'll leave your link in.
  • Leave me pure spam and I'll delete it.
  • Leave a general comment and I'll remove the link but keep the comment.

Notify me of followup comments via e-mail

Bear