Wednesday, 21 June 2006

Customising Visual Studio.NET 2005 for Single and Dual Monitors

I have been using a dual-monitor setup for a couple of years now, and find it a very practial way to develop.

I also work from home, and use Remote Desktop (RDP) to connect back to my workstation at work. The problem is that RDP only works on a single screen - so when you launch Visual Studio, all the windows that were anchored on the second screen now are messed up.

The solution is to use the Import and Export Settings wizard to save two window layouts - one for a single screen and one for a dual screen. You can then load these settings to reset the window layout for the appropriate monitor.

To automate the process even further, you can create some Visual Studio Macros and assign them to a custom toolbar so that you can do it all with a single click of your mouse.

Here's my macro code that loads the two different window settings:

Sub RDPLayout()
    DTE.ExecuteCommand("Tools.ImportandExportSettings", "/import:""U:\My Documents\Visual Studio 2005\Settings\rdp.vssettings""")
End Sub
 
Sub DualMonitorLayout()
    DTE.ExecuteCommand("Tools.ImportandExportSettings", "/import:""U:\My Documents\Visual Studio 2005\Settings\dual monitor.vssettings""")
End Sub

1 comment:

Anonymous said...

Thanks for the tip. Im going to go try to make this happen for my Dual 20's from CineMasive Displays Im using a laptop adapter kit with it though so there's probably going to be some hiccups. I'll keep you posted on the progress. Sounds very promising though.