Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
3  
So when you get back to the PC, why don't you just click on the taskbar icon to maximize? –  Simon Sheehan Jan 6 '12 at 11:39
1  
...or lock your workstation when you leave it unattended. –  Bryan Jan 6 '12 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 –  Nicolás Straub Valdivieso Jan 6 '12 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 '12 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 –  Nicolás Straub Valdivieso Jan 6 '12 at 15:24

2 Answers 2

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.

share|improve this answer
up vote 3 down vote accepted

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: http://stackoverflow.com/questions/18456091/get-a-list-of-all-open-windows-autoit/18457587?noredirect=1#18457587

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.