Hack Forums
[Help] Enabling the maximize button - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5)
+---- Thread: [Help] Enabling the maximize button (/showthread.php?tid=5554497)



[Help] Enabling the maximize button - JoshuTee - Feb 18, 2017

I've written a GUI program in AutoIT, but the maximize button remains grayed out.
How can I enable it in order to allow the user to maximize the window?

Thanks!


* - Rikanono - Feb 19, 2017

Code
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>



Example()

Func Example()
    ; Create a GUI with various controls.
    Local $hGUI = GUICreate("Example", 500, 500, 500, 500, $WS_MAXIMIZEBOX)
    Local $idOK = GUICtrlCreateButton("OK", 310, 370, 85, 25)

    ; Display the GUI.
    GUISetState(@SW_SHOW, $hGUI)

    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $idOK
                ExitLoop

        EndSwitch
    WEnd

    ; Delete the previous GUI and all controls.
    GUIDelete($hGUI)
EndFunc   ;==>Example



* - JoshuTee - Feb 26, 2017

Thanks, pretty much solved it