Home » VB.NET » Overriding Events in VB.NET

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.


Other post in VB.NET

Related Post

  • Manually Adding Event Handlers in VB.NETManually Adding Event Handlers in VB.NET Typically when we write our code, the event handlers get wired up for us using the handles clause.  So we never have to worry about wiring up our event handlers manually. But what […]
  • Object Initialization in CSharp 3.0 and VB.NET 9Object Initialization in CSharp 3.0 and VB.NET 9 Yesterday we looked at the new var keyword in CSharp.  This makes CSharp variable declaration similar to VB.  After all, they've had the DIM keyword for years which essentially does the […]
  • Host jQuery at Google (with Intellisense support)Host jQuery at Google (with Intellisense support) While reviewing my RSS feed this morning, I found this article: 3 reasons why you should let Google host jQuery for you | Encosia I had no idea! The three reasons […]
  • The VB.NET Ternary OperatorThe VB.NET Ternary Operator I think the VB.NET Ternary Operator may be the last operator that I really miss in VB.NET from my curly brace language experience.  Although, I have to admit, I wouldn't have missed it all […]
  • Advantages of Using Class DiagramAdvantages of Using Class Diagram One of the new tools that showed up in Visual Studio 2005 that I don't see many people taking much advantage of is the Class Diagram. The class diagram displays the classes you drag […]

About Dave Bush

Dave Bush is a Full Stack ASP.NET developer focusing on ASP.NET, C#, Node.js, JavaScript, HTML, CSS, BootStrap, and Angular.JS. Does your team need additional help in any of the above? Contact Dave today.