I have a file, xyz.cpp. I want to open two instances of this file in Visual studio (BTW, I am using Visual Studio 2005). Why would I want to do so? I want
to work on a two section of a one long file simply use shortcut ( Ctrl + \ ) or click on split editor window while you are on selected Tab. the icon is on top-right of the VS Code.
Window menu, New Horizontal/Vertical Tab Group there will do, I think.
Open the file (if you are using multiple tab groups, make sure your file is selected).
Menu Window → Split (alternately, there's this tiny nub just above the editor's vertical scroll bar - grab it and drag down)
This gives you two (horizontal) views of the same file. Beware that any edit-actions will reflect on both views.
Once you are done, grab the splitter and drag it up all the way (or menu Window → Remove Split).
You can use the Windows → New Window option to duplicate the current window. See more at: Why I like Visual Studio 2010? Undock Windows
How to open two instances of the same file side by side in Visual Studio 2019:
Open the file.
Click Window -> New Window
.
A new window should be open with the same file.
Click on Window -> New Window Document Group
.
Result:
When working with Visual Studio 2013 and VB.NET I found that you can quite easily customize the menu and add the "New Window" command - there is no need to mess with the registry!
God only knows why Microsoft chose not to include the command for some languages...?