Why does Visual Studio run in "Always on top" mode?

34

7

My copy of Visual Studio seems to be set in "Always On Top" Mode. It runs this way by default; there seems to be no way of changing it.

Visual Studio runs as Administrator/Elevated, but that really shouldn't affect whether or not Visual Studio runs as "Always On Top."

Any idea why this may be occurring, and how to prevent it from happening?

SomeUser

Posted 2011-06-12T06:31:00.677

Reputation: 341

I was able to fix the problem with this: http://stackoverflow.com/a/27411034/2667554

– enn – 2015-04-27T09:54:19.037

Simple restart of visual studio 2010 helped me also. – FrenkyB – 2015-11-19T11:18:51.513

4I saw a glimpse of this problem with Visual Studio 2010 starting to run "Always On Top" in Windows7, but it only happened straight upon a ReSharper update, and got resolved as soon as Visual Studio was restarted. – None – 2012-09-09T09:43:29.663

1Which version of Visual Studio do you refer to? – Marcel – 2013-12-10T10:18:16.303

Do you have ReSharper installed also? It seems to have a history of causing this type of issue on various versions. – panhandel – 2013-12-31T22:48:49.777

Answers

17

I had a similar thing happen with Visual Studio being stuck as always on top. It started happening after I hit the Windows key followed by a bunch of arrow/home/end/pageup/pagedn keystrokes by accident (I had meant to use the control key).

What seemed to clear the always-on-top behavior was to select a different application (eg: Chrome), then press Windows-Home (which minimized everything other than Chrome), then press Window-Home again. Then I could un-minimize Visual Studio, and it would no longer be always on top.

This worked with VS2010, VS2012 and VS2013 when they got into this weird always on top mode.

Edit: revised based on comment from @Nebula

user281806

Posted 2011-06-12T06:31:00.677

Reputation: 271

3This work around didn't work for me. Windows-Alt-Home seems to just tell Chrome to go to the home page. Focusing on the desktop and Windows-Alt-Home didn't seem to work either.

  • I run VS2010 in Admin mode
  • Resharper
  • Windows 7

I don't have a solution, just giving feedback – David Chiew – 2015-02-05T22:35:45.507

7This almost worked for me; I had to press Windows+Home (I didn't know about that one) and then simply pressed Windows+Home again. Windows+Alt+Home just sent my chrome to it's homepage. So: Windows+Home -> wait for the windows to come down -> Windows+Home -> Fixed! – Nebula – 2015-12-10T07:26:40.577

As @Nebula pointed out, the ALT modifier should not be used. Confirmed fix for VS 2017 as well! :) – Johny Skovdal – 2017-07-04T09:17:32.900

Works perfectly with vs2017 – yiabiten – 2019-05-13T13:49:42.213

Thanks! This works with Visual Studio 2019. – ajawad987 – 2019-07-22T15:47:07.200

4

Save your work, close Visual Studio, reopen it. Hit start, or debug, or hit F5.

This worked for me.

Very strange though, for months I didn't have this problem, and earlier when I started debugging, my window was behind Visual Studio's window... Thought it strange as it never happened before. Closed Visual Studio, reopened it, and viola.

James Heffer

Posted 2011-06-12T06:31:00.677

Reputation: 51

2

Perhaps an addin is causing it? Try disabling addins in Tools/Add-in manager then run Visual Studio in safe mode by executing

devenv.exe /safemode

frodeborli

Posted 2011-06-12T06:31:00.677

Reputation: 149

works like a charm with after installing Resharper 8.2 ! – Guy P – 2015-04-29T06:02:27.667

this is the definitive answer imho. – nocarrier – 2014-05-14T01:46:33.117

2

Use windowdetective to check if it's actually set to always ontop Work from there to determine the cause.

Elitism

Posted 2011-06-12T06:31:00.677

Reputation: 51

1

Fixed the issue with VS2017 on Windows 10 by giving focus to another application and pressing Windows+Home (to minimize all windows apart from the one which got focus) and then Windows+Home again to restore all other windows (including VS) and this time VS wasn't always on top anymore.

Bruno Douglas

Posted 2011-06-12T06:31:00.677

Reputation: 11

+1 This worked for me with Visual Studio 2019. Thanks! – ajawad987 – 2019-07-22T15:46:35.783

1

In my case, I was able to get it out of that mode by using Window->Float to undock a tab. After I dragged the tab back onto the main window, it was no longer stuck on top.

Jtbs

Posted 2011-06-12T06:31:00.677

Reputation: 11

0

When I got this problem I found a solution to the reverse problem over at How-To Geek. Luckily it involved a TOGGLE which I could use to disable the always on top mode that Visual Studio's window had gotten into. As per the above link, I added this to my AutoHotkey script

^SPACE:: Winset, Alwaysontop, , A

and then I selected Visual Studio's window and used ctrl-space to toggle always on top. It worked like a charm.

Sebastian Ärleryd

Posted 2011-06-12T06:31:00.677

Reputation: 131

0

Restarting Visual Studio 2015 fixed the problem.

In my case, VS switched in "Always On Top" mode while I was using intellisense from ReSharper.

swabber

Posted 2011-06-12T06:31:00.677

Reputation: 1

0

Maybe for some reason, the always-on-top property of your Visual Studio (VS) is being saved somewhere and then reloaded on run.
Depending on your VS version, you may be able to use FileBox eXtender(FBX) to change its always-on-top property for each run or permanently. It is probably better to use the version matching your Windows' architecture; 64-bit for x64 and 32-bit for x86. Also, FBX can probably be only used for elevated-mode programs if itself is run in elevated mode (e.g. "Run as Administrator").
Always-on-top status can be switched by clicking the pushpin on the program title bar when FileBox eXtender is running.

Mohammad Amin Bandekhoda

Posted 2011-06-12T06:31:00.677

Reputation: 168