KnowDotNet

Hot Hot Keys (Short Cut) in VS2005

Tab Between Window in VS2005

by Les Smith

Are you constantly pressing Alt + Tab to get to the next or previous window in Visual Studio, only to find that you have invoked the Windows List instead?  The sad thing is that I keep forgetting that CTRL+TAB will tab between IDE Windows.  Note the difference Alt+Tab for Windows and CTRL+TAB for VS IDE.

However, in VS2005, Microsoft has added a Window that pops up when you press CTRL+TAB.  This window is shown below and you can CTRL+TAB through the IDE Windows or using the Left Arrow you can move to the Tool Windows on the left of the panel.  Using CTRL+TAB will cause the selection to move there also.  This is a great improvement over previous versions of the IDE.

IDE Tab Window


This article will share some of the most useful Hot Keys in the Visual Studio .NET IDE.  Some of them have been there since classic VB days and some are new in VS2005.

Probably the hot key combination that I misuse the most is Alt+Tab, (without thinking) to get to a previous or next window in the IDE.  This immediately leads to the frustration of tabbing away from the IDE itself because I have erronously invoked the Window List.  Well, in VS2005 you can retrain yourself to use Ctrl+F6 to go to the next window or Ctrl+Shift+F6 to go to the previous window.  What a relief!!!  Here are a few helpful others that work regardless of whether you are a VB.NET or C# developer, they can save you time if you do not already use them.  Although I use the mouse a lot, it is so painful to watch someone constantly switching back and forth between the keyboard and the mouse, simply because they never learned any Hot Keys.  I just want to say, "
PLEASE, LET ME DRIVE!"



One of the neat things in VS2005 is that tabbing through

Hot Key
          Description
Ctrl + F6                 Next IDE Wiindow
Ctrl + Shift + F6      Previous IDE Window
F12                        Go to Definition (highlighted or cursor position in)
Shift + F2               Go to Definition (easier than F12 if you use left hand for hot keys)
Ctrl + Shift + F2      Go previous point in code window
F7                          Switch from Designer to Code Window
Shift + F7               Switch from Code Window to Designer if applicable
Ctrl + Z                   Undo (please stop mousing to Edit Undo)
Ctrl + C                   Copy ( please stop right-click and select Copy from context menu,
PAINFUL to Watch)
Ctrl + V                   Paste (
DITTO)
Ctrl + X                   Cut (
DITTO)
F8                          Step into (VB6 Keyboard Settings F10 Default)
Shift + F8               Step over (VB6 Keyboard Settings F11 Default)
Ctrl + F                   Find (Please stop wasting time by mousing to Edit, Find;
PAINFUL to WATCH)

Don't get me wrong.  I use the mouse a lot, but using your left hand for many of the hot keys, especially the editing functions (Copy, Cut, Paste) will save many seconds to minutes in a day of coding.  Also, learn to drag a highlighted piece of code from one place to another for ease of movement of code.  Dragging a selection will automatically scroll the code window up or down if you need to move it out of the currently visible section of the code window.  By the way, holding the Ctrl Key down while dragging a selection will Copy instead of moving code.l

I was having a discussion with aother developer recently.  You know the type.  If he didn't write it, it can't be any good.  I was discussing the Microsoft Data Application block.  He said, "I hate that that thing; it's so klunky."  I said there's nothing klunky about coding one line of code that is proven to work instead of instantiating two or three objects and their various properites.  He said, "Maybe you're just lazy."  I said, "I don't get paid for coding."  He replied, "Yes you do!  I said with finality, "
No, I don't! I get paid for production!"  Keystrokes and shortcuts to save time mount up and improve your productivity, which is what it's all about, especially for a Contractor!.

Ask a Question, or give your feedback on my articles or products by clicking on My Blog.