Preventing Windows from Stealing Focus

C

Colin Higbie

I hate when a window steals the focus from where I'm typing. I don't care if
it wants to tell me my house is on fire, it doesn't do anyone any good to
pop up a window when I'm typing, because I inevitably hit the keyboard
shortcut to close the window and miss the message altogether. This is
especially annoying if I'm downloading a big file in IE - the window pops up
to tell me that it's done downloading and is copying the file. As I'm typing
away, I trigger the cancel button throwing out the entire download,
potentially one that took hours.

Yes, I know TweakUI includes a setting to "Prevent Application from Stealing
Focus," but it doesn't stick. Every time I restart my computer, it's back to
being turned off.

I found the setting in the Registry - HKCU\Control
Panel\Desktop\ForegroundLockTimeout. I set that to a decimal 200,000 (that's
what TweakUI does). It sticks around for a while, but on restart it always
gets reset to 0.

What could cause that and how do I prevent it? And why on Earth is it not
the default? Does anyone like other windows to steal their focus?

Thanks,
Colin
 
T

Thorsten Matzner

Colin Higbie said:
I hate when a window steals the focus from where I'm typing. I don't care if
it wants to tell me my house is on fire, it doesn't do anyone any good to
pop up a window when I'm typing, because I inevitably hit the keyboard
shortcut to close the window and miss the message altogether. This is
especially annoying if I'm downloading a big file in IE - the window pops up
to tell me that it's done downloading and is copying the file. As I'm typing
away, I trigger the cancel button throwing out the entire download,
potentially one that took hours.

Yes, I know TweakUI includes a setting to "Prevent Application from Stealing
Focus," but it doesn't stick. Every time I restart my computer, it's back to
being turned off.

Create a new user profile and retry from here. If this works, cop your
old user profile to the new user and then delete the old profile.
"How to Copy User Data to a New User Profile"
(http://support.microsoft.com/?kbid=811151)
 
C

Colin Higbie

A new profile defaults to allowing the focus to be taken. Getting all my
stuff set up in a new profile is almost (not quite) as rough as reinstalling
the whole OS. I'd rather not do either. If there is a problem, surely we can
track it down and fix it, rather than just throwing everything out and
starting over.

Any other options?

Thanks,
Colin
 
T

Thorsten Matzner

Colin Higbie said:
A new profile defaults to allowing the focus to be taken. Getting all my
stuff set up in a new profile is almost (not quite) as rough as reinstalling
the whole OS. I'd rather not do either. If there is a problem, surely we can
track it down and fix it, rather than just throwing everything out and
starting over.

Any other options?

No. What I told you is not "throwing everything outand starting over",
because all settings are kept when you copy a profile.
Maybe someone else will hop in here with other suggestions.
 
G

Guest

I am having exactly the same problem with only one of my two computers, both
of which have SP-2. I have tried all the same things except for creating a
new user profile. I want to know if the real problem is a corrupted user
profile or a bug in SP-2. Evidently many people are experiencing the same
problem. I already have several posts about this and for now have frankly
given up. I wish I had the answer. However I will try creating a new user
profile and see if that works. I just wanted you to know that you are not
alone in this. Regards,
 
C

Colin Higbie

Please let me know how that works - and if it does, does it still work when
you copy your old profile on top of it.

I also have two machines, one with SP-2, and only 1 of them has the problem.
The other one keeps the 200,000 value in the registry.

In the meantime, I've added the registry edit to my Startup group so it is
automatically re-applied at startup every time. That seems to work. It does
ask me every time I start up if I want to apply the registry patch. That's a
little annoying, as is the entire fact that I need such a work-around.

- Colin
 
G

Guest

Yes, there is a way to disable the prompts for .reg files.
Use the silent parameter and you will not be prompted to confirm and it will
not tell you it was entered.
Found this out as I had same problem. Kind of stupid that the tweak programs
will not keep the setting. And creating a new profile to me is not a fix, it
is avoidance of the real problem.
Anyway, here is the command:

regedit.exe /s <path of .reg file>

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top