Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Keep applications from stealing focus

How to cure system ADD.


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 Windows 2000 Power Users Newsletter.

Dig Deeper on Windows client management