2

Is there any way to disable the minimize button in windows? I don't use it and when someone else uses my pc they tend to minimize everything

6
  • 3
    So when you get back to the PC, why don't you just click on the taskbar icon to maximize? Jan 6, 2012 at 11:39
  • 1
    ...or lock your workstation when you leave it unattended.
    – Bryan
    Jan 6, 2012 at 11:50
  • I don't use the taskbar, it's disabled. And I'm talking about when I let someone use it for a specific reason, when unattended I always leave it locked Jan 6, 2012 at 13:01
  • So you've 'disabled' the taskbar and want to remove other part of the UI... Why are you using Windows UI if you don't want any of its features?
    – HaydnWVN
    Jan 6, 2012 at 14:18
  • I use windows not because of the UI, there's a lot more to an OS than its UI. I don't like the taskbar nor the minimize / maximize paradigm, so I want to disable it. taskbar is disabled using stardock's objectdock and the minimize paradigm is avoided using winroll. I've used this setup since windows xp and just wanted to know whether you can disable the minimize button or not, and since I've been looking for this for years and just yesterday found this page I thought I'd ask Jan 6, 2012 at 15:24

2 Answers 2

4

after a lot of googling in my spare time, I stumbled across autoit. this excellent tool allows me to script the windows gui and hide the minimize, maximize and close buttons. I'll leave the source and links to the relevant pages here for future reference:

#include <WinAPI.au3>
#include <Constants.au3>
#include <WindowsConstants.au3>
#include <GuiMenu.au3>

$windows = WinList()

For $i =1 To $windows[0][0]
    $windowState =  WinGetState($windows[$i][1])
    $isVisible = BitAND($windowState,2) = 2
    If $windows[$i][0] = '' Or not $isVisible Then ContinueLoop

    $h = $windows[$i][1]
    $iOldStyle = _WinAPI_GetWindowLong($h, $GWL_STYLE)
    $iNewStyle = BitXOr($iOldStyle, $WS_SYSMENU)
    _WinAPI_SetWindowLong($h, $GWL_STYLE, $iNewStyle)
    _WinAPI_ShowWindow($h, @SW_SHOW)
Next

original script: http://www.autoitscript.com/forum/topic/147424-disable-or-remove-close-minimize-maximize-buttons-on-any-window-in-runtime/#entry1045390

listing windows and getting their state and hwnds: https://stackoverflow.com/questions/18456091/get-a-list-of-all-open-windows-autoit/18457587?noredirect=1#18457587

3

Technically it is possible. But it requires knowledge of C++. And it isn't recommended because any program that you run risk crashing. I think the proper solution is to lock your computer and not let other use your PC.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .