Personalization Change ForegroundLockTimeout to Open App window in Front in Windows 11


Taskbar_banner.png

This tutorial will show you how to change the time a new background window will automatically be brought to the foreground (front) for your account in Windows 10 and Windows 11.

ForegroundFlashCount specifies the number of times the taskbar button flashes to notify the user that the system has activated a background window. If the time elapsed since the last user input exceeds the value of the ForegroundLockTimeout entry, the window will automatically be brought to the foreground.

ForegroundLockTimeout specifies the time, following user input, during which the system keeps applications from moving into the foreground.

Reference:


Here's How:

1 Open Registry Editor (regedit.exe).

2 Navigate to the key below in the left pane of Registry Editor. (see screenshot below)

HKEY_CURRENT_USER\Control Panel\Desktop

ForegroundLockTimeout-1.png

3 In the right pane of the Desktop key, double click/tap on the ForegroundLockTimeout DWORD to modify it. (see screenshot above)

4 Select (dot) Decimal, type a number for how many milliseconds you want to keep new app background windows from moving into the foreground, and click/tap on OK.

200000 is the default value.

0 will instantly open the window into the foreground.


ForegroundLockTimeout-2.png

5 Close Registry Editor.

6 Restart the computer to apply.


That's it,
Shawn Brink


 
Last edited:

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
As it said, move windows that open in the background to the foreground. But regardless of the setting, they open in the background and stay in the background.
 

My Computer

System One

  • OS
    Windows 11
As it said, move windows that open in the background to the foreground. But regardless of the setting, they open in the background and stay in the background.

Just to confirm, is its icon flashing on the taskbar?
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
Yes, the icon flashes.

It does appear to be a hit and miss for some apps. :(

Usually, this is for an unattended desktop app when opened, and not Microsoft Store apps.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
It is pretty random, but I don't think the Microsoft Store has much to do with it. I've seen it happen with Microsoft apps.

This is a problem going back many years--I've seen users complaining about it happening on Windows XP. But instead of fixing it, Microsoft just points to threads like this one to claim that it can be fixed. Only the "fix" doesn't work for everyone.
 

My Computer

System One

  • OS
    Windows 11
I left the ForegroundFlashCount at the Default 7.
Just changing the ForegroundLockTimeout (in HKEY_CURRENT_USER\Control Panel\Desktop) from the Default 200000 to 0, and after that restarted the PC did the trick for me.
Thank you Brink.

Johan.
 

My Computer

System One

  • OS
    Windows 11
Brink, What value for Win32PrioritySeparation would work along side with Foregroundlocktimeout =0?
 

My Computers

System One System Two

  • OS
    Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus FX505DT-WB52
    CPU
    AMD Ryzen 5 3550H
    Motherboard
    ASUSTeK COMPUTER INC. FX505DT (FP5)
    Memory
    32 GB DDR4-3200 • CL=22 • NON-ECC • SODIMM • 260-pin • 1.2V • 2Rx8/1Rx8 • PC4-25600
    Graphics Card(s)
    4095MB NVIDIA GeForce GTX 1650 (ASUStek Computer Inc) 128MB ATI AMD Radeon Vega 8 Graphics
    Sound Card
    Realtek High Definition Audio
    Monitor(s) Displays
    Generic PnP Monitor
    Screen Resolution
    (1920x1080@60Hz)
    Hard Drives
    Samsung 860 Evo 500GB
    PSU
    Stock
    Case
    Stock
    Keyboard
    Stock
    Mouse
    Stock
    Internet Speed
    50 MBPS
    Browser
    Mozilla Firefox
    Antivirus
    Norton 360 Premium
  • Operating System
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS
    CPU
    Intel i7 8700k
    Motherboard
    TUF Z390M-PRO GAMING (WI-FI)
    Memory
    OLOy WarHawk RGB (Intel/AMD Ready) 288-Pin PC RAM DDR4 3600 (PC4 28800) 16GB
    Graphics card(s)
    PNY GeForce RTX 3060 12GB XLR8 Gaming Revel Epic-X RGB Single Fan Graphics Card
    Sound Card
    Stock
    Monitor(s) Displays
    LG UltraGear FHD 24-Inch Gaming Monitor 24GL600F-B
    Screen Resolution
    1920x1080 @ 144Hz
    Hard Drives
    PNY CS2140 500GB (SSD)

    Seagate BarraCuda 4TB (ST4000DMZ04/DM004)
    PSU
    EVGA 750 BQ 80 Plus Bronze PSU
    Case
    NZXT H510 Flow
    Cooling
    Cooler Master MA620M dual tower air cooler and SP120 RGB Elite Performance 120MM PMW Triple Fan
    Mouse
    GM702 GAMING MOUSE
    Keyboard
    PICTEK RGB Gaming Keyboard
    Internet Speed
    50 mbs
    Browser
    Mozilla Firefox
    Antivirus
    Norton 360 Deluxe
Brink, What value for Win32PrioritySeparation would work along side with Foregroundlocktimeout =0?
Hello, :alien:

I'd say the default for "Programs".

 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender

Latest Support Threads

Back
Top Bottom