Jump to content

How do I run a different func when the minimize icon is pressed?


Recommended Posts

How do I hijack the minimize routine?

I have a GUI that I would like to make window hidden instead of minimized when minimize is called.

[size="2"]The second mouse gets the cheese[/size]
Link to comment
Share on other sites

This? :unsure:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 357, 197, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 48, 64, 209, 57, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $GUI_EVENT_MINIMIZE
            Guisetstate(@SW_HIDE)
            sleep(5000)
            GUISetState(@SW_SHOW)
    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...