问题
When I start debugging the project we are currently working on, the program window is not given proper focus in windows but is stacked behind the Visual Studio window. I don't think this problem occurs on any of my team members computers, so it looks like it's a problem on my system.
Is there a setting in VS2008 for always on top or something like that? I can't seem to find one...
Any idea what could be causing this? Visual Studio? The program code?
I know this is sort of a vague issue but I'll concider adding more detail if no one recognizes the problem.
EDIT: I am using Visual Studio 2008 with ReSharper, GhostDoc and Resource Refactoring Tool.
EDIT: I've looked through every single option I can find in VS and I can not find anything that would explain this behaviour.
EDIT: I am running this on a dual monitor setup Lenovo Thinkpad Tseries laptop. The monitors are connected through a docking station. Monitor 1 is connected with a DVI cable and monitor 2 is connected vith a VGA cable.
回答1:
I had the same problem that Visual Studio 2010 was running Always-On-Top.
I don't know whether this always works. Anecdotally, I closed Visual Studio 2010. Then I re-ran as administrator. Visual Studio then ran normally, not Always-On-Top. I closed Visual Studio. I ran Visual Studio normally (not as administrator). Visual Studio did not run as Always-On-Top.
Note: by "ran as administrator", I mean that I right clicked; on popup menu clicked on properties; on dialog clicked on "Advanced"; checked "run as administrator".
I did not try running as administrator by right clicking and then clicking "run as administrator" on the popup menu.
I only did this one time because once I got Visual Studio running normally, I did not know how to make it run Always-On-Top again.
回答2:
You can toggle “Always on top” option for the Active window using:
"Windows Key + A"
回答3:
This is just a theory, but after I recently upgraded to ReSharper 4.5 this problem looks to be resolved. It could be a coincidence but I'm inclined to think it isn't... :P
回答4:
I had this problem with Visual Studio 2013 running on windows 10, I'm not 100% sure when or why it started, but it may have been after installing some Windows updates.
I resolved it using a minor variation of the method described by Indinfer:
- Close Visual Studio
- Right click on the Visual Studio shortcut, Run As Administrator. The problem is no longer there.
- Stop and start Visual Studio as normal. The problem is no longer there.
回答5:
I got this when I have AppVerifier set for vstest.discoveryengine.x86.exe
回答6:
Simplest solution is to reset your custom settings on Visual studio.
- Goto -> Tools -> import and export settings -> select "Reset all settings"
- Close all instances of Visual Studio, re-open.
This is safest solution but you will loose all customization you did, e.g. adding line numbers for code files, themeing, etc.
It worked for my Visual Studio 2012 Ultimate.
回答7:
Very Simple. Just Toggle Maximise Button on Visual Studio 2017
回答8:
No solution, but maybe an observation: I got this from time to time too with WinForms applications debugging on a machine with dual monitor enabled. Thinking about it, I never tried turning one monitor off and at my new work we do not create WinForms applications. With Webforms starting a new browser I never had this problem (yet).
来源:https://stackoverflow.com/questions/658807/visual-studio-always-on-top-when-debugging