none
Applications steal focus despite ForegroundLockTimeout being set RRS feed

  • Question

  • Hello everybody,

    I really suffer from that annoying focus stealing problem. It is totally usual for me to have long-running processes running in background, switch to another window and work there - just to have that damn background window popup with a message box or whatever, with all the well-known annoyances.

    I have already set HKCU/Control Panel/Desktop/ForegroundLockTimeout to 200000 decimal, but this just changes _nothing_. Microsoft had this problem nicely solved in Windows 2000, and even better in Windows XP where having the start menu open denied any window to get in the foreground. However, since Windows Vista, things seem to be as bad as they were up to NT 4.0. I can't tell how many times a day I am angry at this desktop for allowing any window to come in my way.

    What must I do to have Windows not allow any window to interrupt my foreground work, finally, please?


    Best Regards, Stefan Falk

    Tuesday, October 23, 2012 2:06 PM

Answers

  • Hi,

    No, there is not such setting that can do it.

    But you could try to increase the value ForegroundFlashCount under HKCU\Control Panel\Desktop.

    Juke Chou

    TechNet Community Support


    Wednesday, October 24, 2012 8:10 AM
    Moderator

All replies

  • Hi,

    This also depends on your Application itself. Normally, if it activate backgroud Window, if the time elapsed since the last user input doesnot exceed the value of the ForegroundLockTimeout entry. Windows will flash the running application button in Taskbar.


    Juke Chou

    TechNet Community Support

    Wednesday, October 24, 2012 6:18 AM
    Moderator
  • Hello Juke,

    Thank you for your answer. But that's the point: Nothing flashes. No time is awaited. It does not depend on the application. Each application just comes into the foreground as it likes to.

    Isn't there some setting to disallow _any_ window to bring itself into front, but instead let Windows just flash its task bar icon?


    Best Regards, Stefan Falk

    Wednesday, October 24, 2012 7:26 AM
  • Hi,

    No, there is not such setting that can do it.

    But you could try to increase the value ForegroundFlashCount under HKCU\Control Panel\Desktop.

    Juke Chou

    TechNet Community Support


    Wednesday, October 24, 2012 8:10 AM
    Moderator
  • Hello Juke,

    Thank you for your message. Subjectively, I would say that things have improved a bit since increasing the ForegroundLockTimeout value to a ridicuously large value.

    But the Problem is *not solved*. Still there are programs (Visual Studio, Explorer) which just get in front when I don't want them to. Do programs have some "I am allowed to go to foreground" setting which is remembered too long? I mean, there must be a reason for this annoying behaviour, especially as it *was much better* unter Windows XP.


    Best Regards, Stefan Falk

    Wednesday, November 21, 2012 10:10 PM
  • Has anyone been able to find a solution to this problem?  We are experiencing it as well and haven't seem much improvement after adjusting ForegroundLockTimeout.  Most of the posts I've read attribute the problem to another application "stealing" focus but it appears that once our application goes unresponsive it's a crap shoot whether or not our application ends in the foreground, another window in our application ends in the foreground, or some other application window ends in the foreground.

    Monday, April 29, 2013 8:19 PM
  • Just like using Alt-tab, but programmatically, go through the process, then select the one to bring to the front.

    Good luck.

    http://www.dreamincode.net/forums/topic/207233-get-a-list-of-active-windows-their-process-names/

    If a program has a splash screen, it might not come to the front, whereas the same program written without a splash screen might work up front.

    VB.net (at least 2008 ) splashscreens can be a focus problem.

    HKCU/Control Panel/Desktop/ForegroundLockTimeout=0 seems to fix this.

    Can someone suggest what the purpose of this timer is, other than to make a pest of itself?

    As many programs spawn a new task/thread for a dialog box, there is a good chance something will hide them.

    EDIT: A simple fix... !!!  A day later...

    no ForegroundLockTimeout=0 required.

    At end of program load, SendKeys.Send(" ") to force program into focus.


    • Edited by neilw20 Sunday, April 10, 2016 3:23 PM
    Saturday, April 9, 2016 4:20 PM