Personalization Enable or Disable Automatically Hide Taskbar in Windows 11


taskbar_settings_banner.png

This tutorial will show you how to enable or disable automatically hide the taskbar for your account in Windows 11.

The taskbar on your desktop is located on the bottom of the screen by default in Windows 11.

If you like, you can have the taskbar automatically hide in Windows 11.

If you enable automatically hide the taskbar, you can show the taskbar on demand by:

If you have turned on Optimize taskbar for touch interactions when this device is used as a tablet, it can also cause the taskbar to auto-hide regardless of this Automatically hide the taskbar setting.



Contents

  • Option One: Enable or Disable Automatically Hide Taskbar in Settings
  • Option Two: Enable or Disable Automatically Hide Taskbar in Command Prompt


EXAMPLE: Auto hide taskbar turned on and off

Windows11_taskbar.jpg
Windows11_taskbar_hidden.jpg





Option One

Enable or Disable Automatically Hide Taskbar in Settings


1 Open Settings (WIn+I).

2 Click/tap on Personalization on the left side, and click/tap on Taskbar on the right side. (see screenshot below)


Automatically_hide_Taskbar_Windows11-1.png

3 Click/tap on Taskbar behaviors on the right side to expand it open. (see screenshot below step 4)

4 Check (enable) or Uncheck (default - disable) Automatically hide the taskbar for what you want on the right side under Taskbar behaviors. (see screenshot below)

Automatically_hide_Taskbar_Windows11-2.png

5 You can now close Settings if you like.




Option Two

Enable or Disable Automatically Hide Taskbar in Command Prompt


1 Open Windows Terminal, and select Command Prompt.

2 Copy and paste the command below you want to use into the command prompt, and press Enter.

(enable automatically hide taskbar)​
powershell -command "&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=3;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}"

OR​

(disable automatically hide taskbar - default)​
powershell -command "&{$p= 'HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3' ;$v=(Get-ItemProperty -Path $p).Settings;$v[8]=2;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}"

3 You can now close Windows Terminal if you like.


That's it,
Shawn Brink


 
Last edited:
  • Like
Reactions: T-1
Add-Type -TypeDefinition 'using System; using System.Runtime.InteropServices; public class Program { [DllImport("shell32.dll")] public static extern IntPtr SHAppBarMessage(uint dwMessage, ref APPBARDATA pData); public const uint ABM_GETSTATE = 0x00000004; public const uint ABM_SETSTATE = 0x0000000A; public const uint ABS_AUTOHIDE = 0x00000001; public const uint ABS_ALWAYSONTOP = 0x00000002; [StructLayout(LayoutKind.Sequential)] public struct APPBARDATA { public uint cbSize; public IntPtr hWnd; public uint uCallbackMessage; public uint uEdge; public RECT rc; public IntPtr lParam;}; [StructLayout(LayoutKind.Sequential)] public struct RECT { public int left; public int top; public int right; public int bottom;} public static void SetTaskBarState() { APPBARDATA abd = new APPBARDATA(); abd.cbSize = (uint)Marshal.SizeOf(abd); IntPtr uState = SHAppBarMessage(ABM_GETSTATE, ref abd); IntPtr param = (IntPtr)((ulong)uState & ABS_ALWAYSONTOP); if (((ulong)uState & ABS_AUTOHIDE) != 0) abd.lParam = param; else abd.lParam = (IntPtr)((ulong)ABS_AUTOHIDE | (ulong)param); SHAppBarMessage(ABM_SETSTATE, ref abd); } }'; [Program]::SetTaskBarState()

I came across a working C++ code that toggled the auto-hide of the taskbar without restarting Explorer. I remade it for Powershell. If it needs to be toggled in the same window just use[Program]::SetTaskBarState()

1714679439831.png
 

My Computer

System One

  • OS
    Windows 11 Pro 64-bit (22621.2283)
Back
Top Bottom