开发者

Visual Studio 2008 toolbars keep moving inexplicably

While I'm working, at various times that don't seem terribly random, the windows keep moving around! Here is a picture of my Visual Studio layout. It's across two screens, so the Solution Explorer is on the right side of the left screen, and the code window is full-screen on the right.

When this happens, the Solution Explorer (and all the other windows docked to it -- Properties and Class View) move. They change size and location. Their location (up-left corner) moves to somewhere in the lower-right side of the code window, and they get wide and squatty.

There is one other spot that my windows go other times, specifically up left of where they are about 30-40 pixels.

I noticed that if I set everything up the way I like it, then close Visual Studio, then open Visual Stuio, most things are then how I like them.

开发者_StackOverflow

There are, as I said, a few ways this is triggered. Specifically, sometimes when exceptions are thrown and the debugger has to catch them and shows that pretty little exception box. I would say about 10 or 20 % of the time, but it doesn't seem totally random. Some exceptions, if I run the program multiple times, and the exception is caught by the IDE, will reliably cause this jump in toolbars. This exception-based-jump is always (as much as I remember) the first jump I described of the Solution Explorer well into the low-right of the Code Window.

Beyond that, sometimes when I start Visual Studio, the windows make the second jump I'm talking about (up left 30 or 40 pixels). This is more reliable. In fact, I'm VERY happy if I can start Visual Studio and the windows are where I want them.

Finally, the question. Is there a settings file somewhere that I can at least look at where Visual Studio is trying to put the toolbars? I noticed that there seems to be separate settings for when Visual Studio is restored, maximized, and full-screen that it remembers and applies at the appropriate time.

Please help me make my IDE more stable!


You may be aware of this and have already taken it into account I can't quite tell from your question but for me the toolbar and window layout are different when debugging than when coding. By this I mean that you can create a different layout during debugging and it is saved by Visual Studio on purpose. You mention that the changes occur with exceptions (although not all the time so maybe this isn't right but hey) which would correspond to when your debugging.

You most likely know this but thought I'd mention it just on case.

Alternatively these links may help

Reset a range of Visual Studio settings, maybe fixing things along the way:

  • http://www.eggheadcafe.com/sample-code/VisualStudio.NET/6c0e3ef6-fefa-445c-aea1-e30b42706ad8/how-to-reset-all-settings-restore-toolbox-items-refresh-visual-studio.aspx

Stackoverflow question regarding toolbar settings - you could try exporting your settings and editing them yourself:

  • How to Export/Import Toolbars in Visual Studio


I seem to remember this happening a lot to me as well. As near as I could tell, it had to do with sizing the window smaller. The toolbars seemed to rearrange to try and fit in the smaller area. As you found, if you just set them how you like and exit, they are still there when you restart. Is it possible that you are resizing the VS window?

It's also possible that it has something to do with when you switch to different views. For example, enter into debug mode. If there's something about your layout that must be adjusted to fit everything for the current mode, perhaps that's changing some positions.

I would just add that since I moved to VS2010, I have not seen this behavior.


You can export specific settings such as the window layout. You can find the export wizard in the extras menu, next to the options menu entry (at least in the german version of VS). There you can select the settings you want to export and type in a file name. Unfortunately the entries are serialized to some string.

I am using several configuration files for VS so that I can switch between single/multi screen layouts. Unfortunately the layout can became broken (even after reloading the config files) when the screen resolution changed. I'd suggest to set up the layout for editing and debugging mode and then save it immediately.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜