Jump to content
Sign in to follow this  

How to disable minimize button..

Recommended Posts


Hello again!I've made a program but I want it so that if you press a button it disable the minimize button so you can't minimize it and it appears again once finished,I believe it's a GUICtrlSetState but how do I define the minimize button?How is it called?Any help appreciated...

s!mpL3 LAN Messenger

Current version [30/09/2015]

Download Here


Share this post

Link to post
Share on other sites

I didn't think this was possible, so I had to test it myself. And rather than let my test go to waste, I figured I might as well show it here as an example.

#include <GUIConstants.au3>
#include <WindowsConstants.au3>

$iStyle1 = BitOr($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU); Style with minimize box
$iStyle2 = BitOr($WS_MAXIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU); Style without minimize box

$gui = GUICreate('', 200, 200, -1, -1, $iStyle1)
$bt1 = GUICtrlCreateButton('Click me to enable', 5, 5, 120, 25)
$bt2 = GUICtrlCreateButton('Click me to disable', 5, 35, 120, 25)

While 1
    $gm = GUIGetMsg()
    Switch $gm
        Case $GUI_EVENT_CLOSE
        Case $bt1
        Case $bt2

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.