Hide Window Control Buttons (Minimize, Maximize/Restore, And Close) Almost Entirely


Raj_

Member
Local time
8:50 PM
Posts
23
OS
Windows 11
Hello To The Eleven Forum Community, This Is Going To Be My Third Post Ever In This Forum After A Long Time...

To Be Honest And I'm Not Exaggerating At All, This Forum Always Gives Me A Very Promising Feeling That If Something (Related To Microsoft Windows) Doesn't Gets Solved Somewhere, Things Are Definitely Going To Get Solved Here Or At Least Explained Enough To Know Whether It Can Be Or Not,

I Mean The Tutorials And Step-By-Step Instructions Are Just So Good To Be True And Same Applies To The Fellow Saviors...

Apart From All The Appreciations,

The Question Arises For Me That Whether The Window Control Button(s) Can Be Hidden, Or That's A No..



From My Understanding And An Attempt To Make It Possible,

I Gradually Started Revolving Around AutoHotKey, The Must-Have Piece Of Software (Specially For The Power Users)

I Also Use Many Other Tools/Software(s) To Improve The Experience By Personalizing The Environment And I Think That There Can Be A Windhawk Mod (Or To Say Injector) For The Situation I'm Facing, And I Think Many Users Might Be Thinking About This Need

I Personally Use AltSnap (Configured To Be WinSnap, Ironically) To Minimize And Maximize/Restore The Active/Focused Window Via Scroll Wheel While Holding Windows Key

I Can Even Close/Kill The Foreground Process Using This Software And Many More; It Can Be Mind Boggling When Try To Set Up The Right Set Of Combinations At Initials

I Use An AHK v1 Script To Navigate Forward/Back Without Using Extra Mouse Button, Instead By Using Alt+ Scroll Wheel To Not Jump Between The Mouse And The Keyboard (Alt + Left/Right Arrow Key(s), Respectively), As Right Now I'm Not Using A Mouse With Special Keys Which Made My Habit To Use Those Key Extensively.



AHK: It Seems To Help But All The Available Scripts Doesn't Work Natively, Not Even In The System32 Processes; Let Alone The Bit-64', The Only Place I Found It Functioning Was In The Test Window Included With The Script (And In The AutoHotKey Processes)

Just To Be Clear, I Usually Prefer v1 Scripts As Those Are The One I Harvested All Seasons Year Long And Works Great With Its Stability

I Think This Much Information Would Be Enough To Encourage You All To Its Curiosity

Hope This Thread Helps More Seekers To Visit This Forum!
 
Windows Build/Version
Microsoft Windows 11 25H2 (OS Build 26200.8039)

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo LOQ 15IRH8
    CPU
    i512450H
    Memory
    8+8GB DDR4
    Graphics Card(s)
    RTX 4060 Mobile 8GB VRAM
    Screen Resolution
    1920*1080
    Hard Drives
    512+512GB PCIe 4.0 NVMe M.2 SSD
Think This Much Information Would Be Enough To Encourage You All To Its Curiosity
Kudos to you for your efforts but I believe I'm safe in saying that most visitors here (and many regulars) are not power users who rely on KB commands for all their computing. Heck, I've been around computers for decades and I don't. On a good day, I think I know maybe 5 KB shortcuts but forget to use them in favor of my mouse. I don't use 3rd party tools either.

But since you do I believe this is your AI answer
You can’t really remove the Windows control buttons (minimize, maximize, close) from normal apps. They’re part of the title bar that Windows itself draws, and Windows doesn’t give us a supported way to hide them completely.

You can turn off the maximize/minimize buttons, but the close button is permanent. Windows requires it for accessibility and to make sure apps can always be closed.

The only time those buttons disappear is when an app draws its own custom title bar (like Chrome, Firefox, Discord, Steam, etc.). In that case, the app is replacing the whole frame, not modifying Windows’ default one — and you can’t force other apps to behave that way.

There are some hacks (AutoHotkey, Windhawk mods, ExplorerPatcher), but they only cover the buttons visually. The hit‑areas still exist, and system apps ignore those tricks anyway.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • Operating System
    Windows 11 Pro 24H2 26200.8457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
    Other Info
    System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.8457
The Question Arises For Me That Whether The Window Control Button(s) Can Be Hidden, Or That's A No..
Yeah they can be removed with windhawk. I’ll post the code in the Windhawk thread in a bit.

There are some hacks (AutoHotkey, Windhawk mods, ExplorerPatcher), but they only cover the buttons visually. The hit‑areas still exist, and system apps ignore those tricks anyway.
No, with the windhawk mod i came up with, they’re gone and the area does nothing if clicked.
 

My Computer

System One

  • OS
    Windows 11 Pro
Sorry for the delay. I actually replicated my windhawk mod with AHK too. here is the ahk to hide the top right corner buttons in FE (to show them again, just kill the script in the tray) (exe is attached, or compile it yourself with below code):

Code:
#Persistent
SetTitleMatchMode, 2
SetTimer, CheckExplorer, 100
global isTransparent := false

OnExit, RestoreOnExit ; Use label for exit handling
return

RestoreOnExit:
    WinGet, hWnd, ID, ahk_class CabinetWClass
    if hWnd
        RestoreWindow(hWnd) ; Restore transparency effect when script exits
    ExitApp
return

CheckExplorer:
    WinGet, hWnd, ID, ahk_class CabinetWClass
    if !hWnd
        return
    WinGetPos, winX, winY, winW, winH, ahk_id %hWnd%

    ; Detect if a new Explorer window has launched
    if (hWnd != prevHWnd) {
        MakeBlackTransparent(hWnd)
        isTransparent := true
        prevHWnd := hWnd
    }
return

MakeBlackTransparent(hWnd) {
    WinSet, Style, -0x80000, ahk_id %hWnd%
    DllCall("SetLayeredWindowAttributes", "UInt", hWnd, "UInt", 0x000000, "Byte", 255, "UInt", 0x1)
}

RestoreWindow(hWnd) {
    WinSet, Style, +0x80000, ahk_id %hWnd%
    DllCall("SetLayeredWindowAttributes", "UInt", hWnd, "UInt", 0x000000, "Byte", 0, "UInt", 0x1)
}
 

Attachments

My Computer

System One

  • OS
    Windows 11 Pro
Thanks For Your Provided Script @dacrone
The Executable Is Working Flawlessly But There Are Some Issues I Faced While Using The Script (Executable):


  1. Not Able To Open Multiple Explorer.exe Windows, Snap Back To The Original
  2. 'WinGetPos' In The Script Never Really Gets Used Here
  3. 'isTransparent' Variable Is Also Unused
  4. 'RestoreOnExit' Only Restores Single Window
  5. Time Frequency Of 100ms Is quite Aggressive
  6. 'prevHWnd' Is Used Without Initialization
And Couple Of More!

Hopefully It Is Helpful
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo LOQ 15IRH8
    CPU
    i512450H
    Memory
    8+8GB DDR4
    Graphics Card(s)
    RTX 4060 Mobile 8GB VRAM
    Screen Resolution
    1920*1080
    Hard Drives
    512+512GB PCIe 4.0 NVMe M.2 SSD
Thanks For Your Provided Script @dacrone
The Executable Is Working Flawlessly But There Are Some Issues I Faced While Using The Script (Executable):


  1. Not Able To Open Multiple Explorer.exe Windows, Snap Back To The Original
  2. 'WinGetPos' In The Script Never Really Gets Used Here
  3. 'isTransparent' Variable Is Also Unused
  4. 'RestoreOnExit' Only Restores Single Window
  5. Time Frequency Of 100ms Is quite Aggressive
  6. 'prevHWnd' Is Used Without Initialization
And Couple Of More!

Hopefully It Is Helpful
here. completely new script(s):

Hide FE (ONLY File Explorer) buttons:
Code:
#Persistent
SetTimer, ModifyExplorerButtons, 500
return

ModifyExplorerButtons:
    WinGet, id, list, ahk_class CabinetWClass
    Loop %id%
    {
        hwnd := id%A_Index%
        WinSet, Style, -0x20000, ahk_id %hwnd%   ; WS_MINIMIZEBOX
        WinSet, Style, -0x10000, ahk_id %hwnd%   ; WS_MAXIMIZEBOX
        WinSet, Style, -0x80000, ahk_id %hwnd%   ; WS_SYSMENU (removes close)
        DllCall("SetWindowPos", "ptr", hwnd, "ptr", 0, "int",0,"int",0,"int",0,"int",0, "uint", 0x27)
    }
return

Same as ^ but toggles ON/OFF with CTRL+SHIFT+B
Code:
#Persistent
toggle := false

^+b::   ; CTRL + SHIFT + B
    toggle := !toggle
    if (toggle) {
        SetTimer, ModifyExplorerButtons, 500
    } else {
        SetTimer, ModifyExplorerButtons, Off
        RestoreExplorerButtons()
    }
return

ModifyExplorerButtons:
    WinGet, id, list, ahk_class CabinetWClass
    Loop %id%
    {
        hwnd := id%A_Index%
        WinSet, Style, -0x20000, ahk_id %hwnd%   ; Remove Minimize
        WinSet, Style, -0x10000, ahk_id %hwnd%   ; Remove Maximize
        WinSet, Style, -0x80000, ahk_id %hwnd%   ; Remove Close (SysMenu)
        DllCall("SetWindowPos", "ptr", hwnd, "ptr", 0, "int",0,"int",0,"int",0,"int",0, "uint", 0x27)
    }
return

RestoreExplorerButtons() {
    WinGet, id, list, ahk_class CabinetWClass
    Loop %id%
    {
        hwnd := id%A_Index%
        WinSet, Style, +0x20000, ahk_id %hwnd%   ; Add Minimize
        WinSet, Style, +0x10000, ahk_id %hwnd%   ; Add Maximize
        WinSet, Style, +0x80000, ahk_id %hwnd%   ; Add Close (SysMenu)
        DllCall("SetWindowPos", "ptr", hwnd, "ptr", 0, "int",0,"int",0,"int",0,"int",0, "uint", 0x27)
    }
}


Hide All Classic TitleBar buttons (notepad++, FE, etc):
Code:
#Persistent
SetTimer, ModifyAllWindows, 500
return

ModifyAllWindows:
    ; Get all top-level windows
    WinGet, id, List

    Loop %id%
    {
        hwnd := id%A_Index%

        ; Skip invisible or cloaked windows
        WinGet, style, Style, ahk_id %hwnd%
        WinGet, exStyle, ExStyle, ahk_id %hwnd%
        WinGetTitle, title, ahk_id %hwnd%
        WinGetClass, class, ahk_id %hwnd%

        ; Skip empty titles and system windows
        if (title = "" || class = "Shell_TrayWnd" || class = "Progman")
            continue

        ; Remove Minimize button
        WinSet, Style, -0x20000, ahk_id %hwnd%   ; WS_MINIMIZEBOX

        ; Remove Maximize button
        WinSet, Style, -0x10000, ahk_id %hwnd%   ; WS_MAXIMIZEBOX

        ; Remove Close button (part of WS_SYSMENU)
        WinSet, Style, -0x80000, ahk_id %hwnd%   ; WS_SYSMENU

        ; Force redraw
        DllCall("SetWindowPos", "ptr", hwnd, "ptr", 0
            , "int",0, "int",0, "int",0, "int",0
            , "uint", 0x27)  ; SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_FRAMECHANGED
    }
return

Same as ^ but toggles ON/OFF with CTRL+SHIFT+B
Code:
#Persistent
toggle := false

^+b::   ; CTRL + SHIFT + B
    toggle := !toggle
    if (toggle) {
        SetTimer, ModifyExplorerButtons, 500
    } else {
        SetTimer, ModifyExplorerButtons, Off
        RestoreExplorerButtons()
    }
return

ModifyExplorerButtons:
    WinGet, id, List   ; <‑‑ ALL WINDOWS
    Loop %id%
    {
        hwnd := id%A_Index%
        WinSet, Style, -0x20000, ahk_id %hwnd%   ; Remove Minimize
        WinSet, Style, -0x10000, ahk_id %hwnd%   ; Remove Maximize
        WinSet, Style, -0x80000, ahk_id %hwnd%   ; Remove Close (SysMenu)
        DllCall("SetWindowPos", "ptr", hwnd, "ptr", 0, "int",0,"int",0,"int",0,"int",0, "uint", 0x27)
    }
return

RestoreExplorerButtons() {
    WinGet, id, List   ; <‑‑ ALL WINDOWS
    Loop %id%
    {
        hwnd := id%A_Index%
        WinSet, Style, +0x20000, ahk_id %hwnd%   ; Add Minimize
        WinSet, Style, +0x10000, ahk_id %hwnd%   ; Add Maximize
        WinSet, Style, +0x80000, ahk_id %hwnd%   ; Add Close (SysMenu)
        DllCall("SetWindowPos", "ptr", hwnd, "ptr", 0, "int",0,"int",0,"int",0,"int",0, "uint", 0x27)
    }
}
 

Attachments

My Computer

System One

  • OS
    Windows 11 Pro

Latest Support Threads

Back
Top Bottom