Applications stealing focus - reg key no longer fixes

Anonymous
2010-04-08T18:42:59+00:00

I want to prevent any applications from stealing focus in windows 7 (and Vista).  Tweakui used to modify the below Registry key to 0.  Then there was a key that affected the number of flashes a "want to steal focus" window would make in the taskbar.

ForegroundLockTimeout

HKEY_CURRENT_USER\Control Panel\Desktop

This reg key is apparently no longer working.  Focus stealing is a major problem, from canceling/oking window that pop-up, to getting virus's from IE windows.  Applications are still written to do this, including MS Office 2007.  If you are typing an email something can pop up and get the next key stroke.  I need to fix this.  Any ideas, or has Windows completely removed a needed feature.

tags: steal focus apps active regedit

Windows for home | Previous Windows versions | Apps

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2011-10-23T11:13:03+00:00

I solved the problem in this way:

I noticed that just before the focus was "stolen", the PC got "busy" for a second (beside the mouse appeared the small circle indicating the processor is working hard on sth).

So I started the Task Manager and gave a close look at the processes. I noticed that one process took over a relevat percentage of CPU usage exactly an instant before the focus was stolen from the task manager window.

Since it was a process that I don't need to be active all the time (sth about Vodafone Mobile connection, which I rarely use) I just stopped the process and then didn't allow the process to be started every time I turn on the PC. I did this last step using Piriform's free software  "CCleaner", but I'm sure you can find different tools for this...

This was enough to fix it ...

Hope this helped!

Bye!

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

166 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-08-12T06:56:38+00:00

    Hi, I had this problem too and after reading through this discussion had given up hope. But still I wanted to at least try out those registry hacks. So I followed the instructions here which changes the 

    ForegroundLockTimeout

    HKEY_CURRENT_USER\Control Panel\Desktop

    registry key  the OP mentioned. And I have to report it worked for me. I am using Win 7 x64 Professional. I tried 

    Start -> execute -> cmd.exe -> OK

    ping -n 15 127.0.0.1 && notepad

    and it worked. I had switched to my browser, and 15 seconds later notepad quietly opened in the background. So maybe you all should try this again, and hopefully it will work for you too.

    -MadJoker

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-08-07T18:50:27+00:00

    It's up to the masses of regular users to make noise about what they don't like. If they refuse to be assertive or don't know how to properly explain themselves (as I believe is the case with focus stealing) then the problem will never be acknowledged, let alone addressed.

    What needs to happen first is that regular users should be observed doing some day to day tasks and just look at how many of their routine operations are superfluous or redundant. Then you can see why focus stealing, with the Windows Update implementation being among the most egregious, is in fact NOT a feature but a mistake, an error in judgement. It does not promote productivity from users NOR from administrators. It is a design flaw and a sticking point for people who are stuck with using Microsoft Windows desktops and servers. As much as I love using Windows, I hate when it contradicts my intentions.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-08-07T17:27:04+00:00

    Focus stealing has been a huge problem in Windows for at least since Windows XP, and probably longer than that. The method to protect against focus stealing has never worked - Granted, a has worked with a few programs, but the majority of programs still steal focus. These programs include those built by Microsoft, such as Microsoft Visual Studio (All versions).

    It is clear that Microsoft doesn't intend on solving this issue, as this problem has existed for at least 10 years.

    As far as I can tell, the only way to fix this, would be to intercept the call to SetForegroundWindow (http://msdn.microsoft.com/en-us/library/ms633539(v=VS.85).aspx) to prevent the original functionality from being invoked. Unfortunately I have had very limited success in intercepting function calls, so if anybody has had any success in doing this, please let me know about it.

    Was this answer helpful?

    0 comments No comments