Jump to content

How to disable minimize button..


AoRaToS
 Share

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 2.9.9.1 [04/07/2019]

s!mpL3 LAN Messenger.zip

s!mpL3

Link to comment
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)
GUISetState()

While 1
    $gm = GUIGetMsg()
    Switch $gm
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $bt1
            GUISetStyle($iStyle1)
        Case $bt2
            GUISetStyle($iStyle2)
    EndSwitch
WEnd
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...