Sign in to follow this  
Followers 0
JAFN

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

3 posts in this topic

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]

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thank you.

Thought I had checked the events but I guess not well enough.


[size="2"]The second mouse gets the cheese[/size]

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  
Followers 0