12

I'm running VS2008 and have used SystemParametersInfo to activate "Focus Follows Mouse" and "Do not Raise On Focus." Sadly though, VS2008 (with and without SP1) doesn't honour the "Do not Raise" part and eagerly pushes into the foreground every time the pointer touches its window.

A while ago I complained about that on my blog and posted an example app to set the parameters. Two others also reported having that problem, but they too didn't know how to proceed.

How could I fix/workaround this problem? Anything else I should try?

David Schmitt
  • 58,259
  • 26
  • 121
  • 165

3 Answers3

4

I know this problem is very old, but it still occurs with VS2019 and this thread is one of the first hits when someone searches for 'auto-raise'.
In my case, I enabled X-mouse via a regedit, and had to live with this behaviour for quite a while.
A couple of days ago I found a solution for Visual Studio autoraising itself when you hover the mouse over a window:
Options -> Environment -> Tabs and Windows -> uncheck both entries under 'Floating Windows'.
('floating tab wells stay on top' and 'floating tool windows stay on top')

  • 1
    Didn't work for me :( What are your registry settings? I have Desktop\UserPreferenceMask = 91 (first byte) and Mouse\ActiveWindowTracking = 1 – ariel Jan 15 '21 at 14:24
  • 1
    It still raises itself when displaying a tooltip, such as when hovering over a type or variable in a C# file. But this is an improvement! – binki Sep 21 '22 at 06:02
0

Try true X-mouse. At least visual studio won't steal the focus anymore. You might not like the copy-and-past behaviour it introduces, though, and also pop-up windows usually don't appear in visual studio (use alt-tab to find them).

Jan de Vos
  • 3,778
  • 1
  • 20
  • 16
  • 1
    Rul-o-matic! Except that it disables the middle mouse button for things like "open in new Tab" in firefox :-/ – David Schmitt Sep 23 '08 at 14:22
  • 1
    ... and of course I had to disable the native FFM behaviour again to keep the studio from popping up. – David Schmitt Sep 24 '08 at 07:24
  • 2
    For me True X-mouse doesn't solve the problem. VS still raises its main window when one of its documents/files is focused. Neither does X-Mouse Controls solve this issue. It seems like other Microsoft stuff tend to do this too, like Onenote. It does this with X-Mouse Controls, but not with True X-Mouse... – robcsi Apr 17 '19 at 10:03
  • 1
    While I really want to solve this, even reading the OP, this has too many downsides. – zBeeble Oct 02 '21 at 20:28
0

I've noticed that Visual Studio only seems to auto-raise when a "document" has focus in VS. If you select a Find Results window or the Solution Explorer in VS, then the auto-raise doesn't occur.

  • 4
    I'm using FFM to avoid clicking when switching apps. Clicking in the app I'm leaving is no improvement over clicking in the app I'm going to. – David Schmitt Jan 13 '09 at 08:58
  • Even when a document is not focused, sometimes VS will raise if the cursor travels over "Sign in" button near the navbar :*( – Daniel X Moore Feb 13 '15 at 17:12