Hi all, is it possible to disable the 'minimize' and 'restore down' buttons of an application such as Wordpad i.e. mouse clicks are disabled in a certain area of the screen?
Thanks
Hi all, is it possible to disable the 'minimize' and 'restore down' buttons of an application such as Wordpad i.e. mouse clicks are disabled in a certain area of the screen?
Thanks
Using this function on Windows 7, the minimize button still "appears" to be active, but doesn't do anything when clicked. Hopefully that's good enough.
;Test hotkey - disable minimize button of the active window F1::DisableMinimize(WinExist("A")) ;Modified from SKANs DisableCloseButton function DisableMinimize(hWnd) { hSysMenu:=DllCall("GetSystemMenu","Int",hWnd,"Int",FALSE) nCnt:=DllCall("GetMenuItemCount","Int",hSysMenu) DllCall("RemoveMenu","Int",hSysMenu,"UInt",nCnt-4,"Uint","0x400") DllCall("DrawMenuBar","Int",hWnd) }
Join us at the new forum - http://www.ahkscript.org/
I like your solution more vsub, nice
Join us at the new forum - http://www.ahkscript.org/
Thanks guys both solutions are great especially wrapping it up in just one line vsub!
How do I add the 'Restore down' so that too is in active? Also will this disable the 'Restore Down' function when you double click the top bar?
Looks like WinSet, Style, -0xC00000, A should do the trick!!
Using this function on Windows 7, the minimize button still "appears" to be active, but doesn't do anything when clicked. Hopefully that's good enough.
;Test hotkey - disable minimize button of the active window F1::DisableMinimize(WinExist("A")) ;Modified from SKANs DisableCloseButton function DisableMinimize(hWnd) { hSysMenu:=DllCall("GetSystemMenu","Int",hWnd,"Int",FALSE) nCnt:=DllCall("GetMenuItemCount","Int",hSysMenu) DllCall("RemoveMenu","Int",hSysMenu,"UInt",nCnt-4,"Uint","0x400") DllCall("DrawMenuBar","Int",hWnd) }
how could this be modified for the close button?
This is not what i wanted; i wanted the close button to appear "active" and not greyed out. :-/