Is it possible to remove the option to minimize a window?

Solution 1:

You can use the free AutoHotkey.

The following AutoHotkey script will use the following keys to modify the currently active window:

  • Ctrl+F11 : remove minimize and maximize buttons, set the window to be always on top, start a timer to test if it's minimized and then restore it
  • Ctrl+F12 : undo the above

Here is the script:

winid := 0

^F11::
  WinSet, Style, -0x30000, A    ; remove minimize and maximize buttons
  Winset, Alwaysontop, On, A    ; set it on top of all other windows
  WinGet, winid, ID, A          ; keep the ID of the active window
  SetTimer, RestoreWindow, 500  ; run RestoreWindow subroutine every half a second
  return

^F12::
  WinSet, Style, +0x30000, A    ; add minimize and maximize buttons
  SetTimer, RestoreWindow, Off  ; stop RestoreWindow from looping
  winid := 0
  Winset, Alwaysontop, Off, A   ; undo on top
  return
  
RestoreWindow:
  WinGet, WinState, MinMax, ahk_id winid
  If MinMax = -1                ; if window is minimized
    WinRestore, ahk_id winid
  return

After installing AutoHotKey, put the script in a .ahk file and double-click it to test. You may stop the script by right-click on the green H icon in the traybar and choosing Exit. To have it run on login, place it in the Startup group at C:\Users\USER-NAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.

Useful AutoHotkey documentation:

  • List of Keys
  • Hotkeys