Question Quick shortcuts from VB6 in VB.NET

xsys

New member
Joined
Mar 17, 2010
Messages
4
Programming Experience
5-10
I have finally made the move to VB.NET (VS2008) and don't look back, however there are a few little annoyances that slow down development. VB6 had certain shortcuts that allow for quick navigation, problem is I can't find how to do this in .NET.

The following points are the shortcuts in VB6 i'm referring to. If someone can advise how to do them in .NET that would be great:

1) Hold the Shift key and double-click the form to go straight to it's code

2) When double-clicking on a control in the designer, it takes you to the code and creates a new event (unless an event for this control exists, then it takes you there). VB.NET seems to ignore existing events for the control and always creates a new default event like "_Click".


Thank you...
 
Last edited:
1. One option is just doubleclick the form, see 2. You can also use the context menu and select View Code. F7 is the keyboard shortcut.

2. Doubleclicking the control/form means 'take me to the controls default event, create if not exist'. In Designer you can select Events view in Properties window and doubleclick any of the listed events to either go there or create it, this is valid for any control selection (including multiple selections).
 
Thanks John for the reply.

The F7 option is probably the next quickest way to see the code, but when in the code of a a form and you want to see the code of another form, you use to be able to hold Shift and double-click the form in the "Solution Explorer" window. Viewing the code through the context menu is suprisingly slow when you're use to the Shift shortcut.

Is there any way you can change what's considered the default Event of a control? Or a VB.NET setting which lets you go to an existing event for the control when you double-click it?
 
Is there any way you can change what's considered the default Event of a control? Or a VB.NET setting which lets you go to an existing event for the control when you double-click it?
No, this is set in class definition (DefaultEvent attribute). No setting I'm aware of.
 

Latest posts

Back
Top