Working with Documents in Microsoft Visual Studio
- 8/24/2011
- 04.01 Insert Documents to the Right of Existing Tabs
- 04.02 Recent Files
- 04.03 Working with Documents on Multiple Monitors
- 04.04 Navigate Open Document Windows
- 04.05 Close the Current Document Window
- 04.06 Open a File Location from the File Tab
- 04.07 Open the File Menu Drop-Down List from Your Keyboard
- 04.08 Using the IDE Navigator
- 04.09 Multiple Views of the Same Document
- 04.10 Closing Just the Selected Files You Want
- 04.11 Understanding the File Open Location
- 04.12 Show Previous Versions
- 04.13 Using Custom File Extension Associations
04.09 Multiple Views of the Same Document
WINDOWS |
Alt,W, N |
MENU |
Window | New Window |
COMMAND |
Window.NewWindow |
VERSIONS |
2005, 2008, 2010 |
CODE |
vstipEnv0016 |
Sometimes you might want to look at a particularly large document in several different areas at the same time. For example, you might want to look at the same document on multiple monitors. This tip shows you how to make this happen.
Special Note for VB Users in Visual Studio 2010
This feature is turned off by default in VB. A lot of history and reasoning is behind this, but the long and short of it is that this was fixed for 2010 but time ran out and it wasn’t tested. So you can turn this on for VB, but you do so at your own risk. Special thanks to my friend Dustin Campbell for supplying the history and the fix.
To to fix this, go to “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Languages\Language Services\Basic\” and rename the Single Code Window Only registry key to something like [your initials here] Single Code Window Only. The following illustration shows what I did:
Now restart Visual Studio, and you are good to go for the rest of this tip.
Multiple Views
I came across this while I was checking my email one day and noticed a thread started by the legendary Deborah Kurata concerning the Window | New Window menu item. The following example describes how it works.
Open a document window.
Now go to Window | New Window on the menu bar to open a duplicate window of the current document.
Notice that “:1” is added to the existing document tab text and that “:2” is appended to the name on the new document tab. You can apparently do this forever (or at least up to 150, which is as high as I have tested this feature).