Thursday, February 26, 2009

Visual Studio Settings Don't Seem to Hold!

So a coworker found this wonderful link on saving Visual Studio settings in a macro, so I thought I'd implement it. I use dual-monitors at work, so I adjusted all of my nice little floating windows on my right monitor, and left the text editor portion on the right. Then I saved my settings because I was so fond of them.

Everything was working great until I started up another instance of Visual Studio and reloaded the settings I saved. For some reason, which I couldn't figure out immediately, the windows in the right monitor were somehow offset from where they should be. All of them were a few pixels to the right. This really upset me.

As I started fiddling around with the window, I found that when I restored the window, moved it a little bit, maximized it again, and then reloaded the settings, the windows on the right moved also.

Moral of the story:

Always make sure the top left corner of your main Visual Studio window is properly placed against the top left corner of your screen when you decide you want to save your settings. If you need to reload your settings at some point, you would also make sure the top left corner of the restored Visual Studio window is in the top left corner of the screen before reloading the settings, and everything will get put in the right place.