Tip

Keep applications from stealing focus

 

Keep applications from stealing focus
Serdar Yegulalp

"Focus" is the term used to describe which application is currently enabled for typing or menu activity from the keyboard. When you switch to a given window, that window is said to be in focus.

Some applications like to steal program focus. This can be annoying if you are trying to get work done, and have an app that you need running constantly stealing focus from the one you're using to get your job done.

To address this problem, you can edit the registry to change how the system handles application focus.

  1. Run REGEDT32 and go to HKEY_CURRENT_USERControl PanelDesktop.
  2. Edit (or add, if it doesn't yet exist) the following REG_DWORD keys: ForegroundLockTimeout. This controls how long an app has to wait before it can seize focus. If this is set to 0 (which it is by default), then any program can grab focus. Set it to a decimal value of 200000, or 200 seconds, which will keep the program from assuming focus for that length of time.

ForegroundFlashCount: Controls how many times the taskbar icon for an app flashes when an app tries to take focus. It's set to 3 by default, but set it to 0 (decimal or DWORD), so that the taskbar icon flashes continuously until it's clicked.

These changes should take effect immediately.


Serdar Yegulalp is the editor of the

    Requires Free Membership to View

Windows 2000 Power Users Newsletter.


This was first published in April 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.