Noobster24 Posted June 30, 2007 Share Posted June 30, 2007 (edited) Hi,I searched the forum for tray maximize click, but I couldn't find my answer there. Is there a(n easy) way to maximize your GUI when you click or double click the TrayIcon?I know the @SW_SHOW etc. commands, but I can't find the command I need in the help-file.Any ideas?Thanks,Andreas//Edit ah stupid me, found it:GUICtrlSetOnEvent($TRAY_EVENT_PRIMARYDOWN, "OKButton") Edited June 30, 2007 by Noobster24 Programs so far:Teh Serializer - Search for licenses for Nero - Windows - Office - Alcohol etc. Link to comment Share on other sites More sharing options...
martin Posted July 1, 2007 Share Posted July 1, 2007 Hi, I searched the forum for tray maximize click, but I couldn't find my answer there. Is there a(n easy) way to maximize your GUI when you click or double click the TrayIcon? I know the @SW_SHOW etc. commands, but I can't find the command I need in the help-file. Any ideas? Thanks, Andreas //Edit ah stupid me, found it: GUICtrlSetOnEvent($TRAY_EVENT_PRIMARYDOWN, "OKButton") Maybe this will help #include <GuiConstants.au3> $gg = GUICreate("sample 1") GUISetState() Opt("TrayAutoPause",0); Script will not be paused when clicking the tray icon. $zal = TrayCreateItem("Maximise") TrayCreateItem("") TraySetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop $tsg = TrayGetMsg() Switch $tsg Case $zal GUISetState(@SW_RESTORE,WinGetHandle("sample")) EndSwitch WEnd Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Noobster24 Posted July 1, 2007 Author Share Posted July 1, 2007 Maybe this will help #include <GuiConstants.au3> $gg = GUICreate("sample 1") GUISetState() Opt("TrayAutoPause",0); Script will not be paused when clicking the tray icon. $zal = TrayCreateItem("Maximise") TrayCreateItem("") TraySetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop $tsg = TrayGetMsg() Switch $tsg Case $zal GUISetState(@SW_RESTORE,WinGetHandle("sample")) EndSwitch WEnd Thanks, but I found this function in the helpfile: TraySetOnEvent ( specialID, "function" ) Works great for me! Programs so far:Teh Serializer - Search for licenses for Nero - Windows - Office - Alcohol etc. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now