Preventing Outlook (and other programs) from stealing focus

This post describes how to stop Windows applications from stealing focus from each other. In a practical sense, no piece of software should be able to “jump” to the top and activate your cursor in it, after the steps in this blog post have been applied.


After some recent batch of Windows updates my Outlook desktop client started stealing focus whenever there was a new email coming in. Like most people, I get a lot of email, and after a while my humor completely ran out with Outlook jumping in, stealing my keystrokes and doing whatever those keystrokes were bound to in Outlook.

Okay, it’s worth another post, whether broken updates should be pushed to end-users, but let’s not go there.

Some quick googling did not yield any good solutions for me. The best that was given to Outlook alone was to disable all add-ins, but that did not do the trick.

I did not find a suitable solution for just Outlook, but luckily that doesn’t stop us from disabling ALL APPS from stealing focus altogether! And to me, that’s not bad. No app should be jumping around frantically anyway.

Why and when does stealing focus happen?

At least in my case, it was fairly simple. Any time Outlook would show a notification for new mail, the window also stole focus. I already disabled practically all of the notifications from Windows 10 Notification Center, but that did not help. The darn window was still popping up constantly when I was doing something else.


This solution was outlined in this conversation. We’ll be setting the registry key for Foreround Lock Timeout to 0, effectively stopping that timeout from ever expiring. Down below the steps with a few screenshots:

  1. Open regedit (win+r, write regedit, or just search for regedit in Start menu).
  2. Export your registry to make a backup before making changes!
  3. Browse to HKEY_CURRENT_USER > Control Panel > Desktop..
  4. Edit ForegroundLockTimeout (see below) to be 0 instead of whatever there is.
Regedit before changes stopping Outlook from stealing focus

Regedit before changes stopping Outlook from stealing focus.

Regedit after changes stopping Outlook from stealing focus

Regedit after changes stopping Outlook from stealing focus.


And that’s it! You should be good. 

The following two tabs change content below.
A Software Developer working on SharePoint, Azure, Office 365 and a lot of other stuff. Writing this blog to document interesting things I've found out here and there.

Leave a Reply

Your email address will not be published. Required fields are marked *