Sign in to follow this  
Followers 0
erezlevi

HELP ME PLEASE ....

3 posts in this topic

I just can't find how to do it. I have a minimized window in the tray. how to bring it up?

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Hi! Try this example:

#include <GuiConstants.au3>

Opt("TrayOnEventMode", 1)
Opt("TrayMenuMode", 1)

$hGui = GUICreate("Test GUI", 300, 200)

$TrayRestore = TrayCreateItem("Restore")
TrayItemSetOnEvent(-1, "TrayEvent")

TrayCreateItem("")

$TrayExit = TrayCreateItem("Exit")
TrayItemSetOnEvent(-1, "TrayEvent")

GUISetState()

While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
        ExitLoop
    Case $GUI_EVENT_MINIMIZE
        GUISetState(@SW_HIDE)
    EndSwitch
WEnd

Func TrayEvent()
    Switch @TRAY_ID
    Case $TrayRestore
        If Not BitAND(WinGetState($hGui), 2) Then
            GUISetState(@SW_SHOW, $hGui)
            GUISetState(@SW_RESTORE, $hGui)
        EndIf
    Case $TrayExit
        Exit
    EndSwitch
EndFunc ;==>TrayEvent
:) Edited by rasim

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