The Weekly Geek

I'm the Geek so you don't have to be!

The Weekly Geek random header image

Attachments or new Windows opening behind current one

June 22nd, 2016 · 20 Comments

Lately I have had a couple of customers call letting me know that when they open an attachment in an email or when their program opens a new window it is appearing behind all other windows on the monitor, not on top as usual. When a new windows is opening behind an existing window it is normally because there is a delay in the system.

Since this was happening on different programs and at different businesses, specifically Windows Live Mail 2012 and Dentrix, I would not presume they were related, however they were.

While researching for this article I found many different issues with the same end, new programs opening behind existing ones, emails opening behind the client and more.
It appears that something was in common with them, recent Windows updates. Not a specific update since these issues have been occurring for years. From what I can tell the people had recently run or Windows had run its update.

Regardless of what programs are doing it and regardless of why it is happening the fix is pretty easy, yet difficult. It is easy because you only need to change one number, regardless of its value to “0” (zero). It is difficult because it is being done in the registry of your computer. The registry is literally the DNA of Windows and if you muck it up, you can trash your entire system.


The first thing we are going to do is backup the registry in case something goes wrong.
Let’s get started. First, In Windows 10, click in your “search” or “Cortana” box, in Windows 7 click on your “start” button and in the “run” box, or if you have Windows 8 and are at the app window just start typing in “regedit”.


Win10RegeditClick on the Regedit icon. A new windows appears, it may be behind others you already had open.


The first thing we want to do is back it up for safety. In the upper left corner click on “File” and then “Export”.

Once again a new windows will appear (maybe behind all the others). At the bottom left of that window, in a section marked “Export range” make sure “All” is selected. See the red circle below.

RegistryExportNext in the left column click on “This PC” or your equivalent. See the green circle above. This will change what appears in the main white box.

Using the handle on the right, scroll to your “C:” drive. Red circle in the image below.

RegistryExport2Double-click on your “C:” drive and under file name (green circle above) type in “registryBU” then click the “Save” button. You have now saved a backup directly to the root directory, now if things go wrong you can more easily get to it.

Let us continue with the fix. You still should have the “Registry Editor” on your display, using the navigation and arrows on the left side click on the arrows and navigate to “Computer / HKEY_CURRENT_USER / Control Panel”. Click on the word “Desktop” under “Control Panel”.


The items listed should be in alphabetical order, scroll down using the right side scroll bar and find “ForegroundLockTimeout”.

ForegroundDouble-click on the text “ForegroundLockTimeout” and a new window will appear.

ForegroundDWordChange the value in “Value Data” to “0”, a zero with no quotes. It does not matter if ‘Hexadecimal’ or ‘Decimal’ is selected to the right, zero is zero in both instances.

Click on “OK” to close the little screen then close the Registry Editor either via the “X” in the upper right or by going to “File” and then “Exit” in the upper left corner.

All that is left is to reboot your computer and life should be good again.

Until we meet again, have a virus free week.

Tags: Backing up · Software

20 responses so far ↓

  • 1 Andrea Barlow // Jan 10, 2017 at 12:23 pm

    I haven’t tried it yet, but thank you so much for such clear instructions!!! I’m off to give it a go now! 🙂

  • 2 Brian // Jan 22, 2017 at 8:25 am

    This WORKED. No hassle….straight to the point.
    I searched EVERY where and BOOM!

  • 3 The Weekly Geek // Jan 22, 2017 at 4:26 pm

    Brian, glad it helped you.

  • 4 robert // Apr 26, 2017 at 6:53 am

    I tried it and it did not work
    I notice your DWORD image is for 32 bit
    My computer is 64bit will the value be the same
    I have been battling with this problem for a week
    Sick of Windows 10

  • 5 Mark Dicker // Nov 21, 2017 at 1:59 pm

    windows help said press alt and tab together it solve problem for me

  • 6 martha worley // Feb 25, 2018 at 11:40 am

    I generally have little success following fixes like this, but the clear explanation was easy to follow, and fixed my problem quickly. Thank you so much!

  • 7 Omar // May 1, 2018 at 12:12 pm

    It worked for me! Thanks

  • 8 Sean Torres // Jun 16, 2018 at 4:40 pm

    yup all i had to do was type a 0. You incredible person you. If I could I would hug you.

    I have vision problems and at first I didn’t understand what was happening.

    Then I would go to task manager and hit maximize.

    But y?

    Anywho all I know is it happened one day after an update. Ugh. Eyes roll. Windoze.

    But yeah I finally found this page after trying several things.

    Someone give this person a raise. Give me a better job.

    Test yo stuff…

  • 9 Chris // Jun 22, 2018 at 3:24 pm

    Thank you for this post.

    This mostly solved the problem on my computer. Attachments within my email client once again open in the forefront. Images open in the foreground from Explorer. However, if I click on an icon on the desktop that is visible off to the side of my browser, it opens behind the current window for some, but not all applications.

    It’s a wonder Mac does not have greater market share.

  • 10 Akshansh // Aug 29, 2018 at 11:43 am

    Thanks a lot 🙂 It worked.

  • 11 sannet ntuli // Apr 18, 2019 at 1:04 am

    worked lyk a charm tahnx a lot ur the beat

  • 12 sannet ntuli // Apr 18, 2019 at 1:07 am

    sorry for the typing error, meant your instructions worked perfectly thanx a lot you are the best

  • 13 Annie // May 4, 2019 at 9:24 pm

    You’re a legend! Worked first time. I’ve had weeks of this problem searching for an answer. Many, many thanks.

  • 14 Harold E Frear // Jun 13, 2019 at 5:45 pm

    This fix only fixes the problem for a day or two then I’m right back to where I started. Simply rebooting the computer does the same thing, fixed for a couple of days then everything opens behind Crome.

  • 15 The Weekly Geek // Jun 13, 2019 at 6:53 pm

    Is the registry resetting after each boot? If so you have something else doing that. This is a registry change and should stick.

  • 16 Grizel Christine Adobbati // Jul 16, 2019 at 10:11 am

    Best step-by-step instructions. Thanks!
    Problem solved 7/16/2019

  • 17 Lucas // Sep 16, 2020 at 3:16 pm

    My mail app on windows 10 was occasionally opening attachments on the background.

    But it was solved after this tutorial. Thanks!!!

  • 18 jippy // Apr 8, 2021 at 7:31 pm


    We had been struggling with modals opening in background since 6 months and the following settings has resolved it for all our clients:

    Change the cache behavior in IE from “automatic” to “Every time the page changes” and you will never face this quirky issue 🙂

  • 19 The Weekly Geek // Apr 22, 2021 at 5:43 am

    Jippy, you are absolutely correct, changing that one setting in IE is a great idea. Anyone know how to do the same in Edge?

  • 20 i_wanilin // May 17, 2021 at 11:21 am

    I am so grateful for your article! I usually don’t leave any comments, but for some reason recently one program stopped opening windows explorer on top of every window, it was so frustrating. I’ve visited a couple forums before found this precious article!! Thank you very much and I wish you all the best!

Leave a Comment