billthecreator Posted June 13, 2007 Share Posted June 13, 2007 how would you minimize the gui but not have it show up on the bottom but in the tray as an icon?? [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 13, 2007 Moderators Share Posted June 13, 2007 http://www.autoitscript.com/forum/index.ph...st&p=310179 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted June 13, 2007 Share Posted June 13, 2007 http://www.autoitscript.com/forum/index.ph...ighlite=to+tray8)8) Link to comment Share on other sites More sharing options...
smashly Posted June 13, 2007 Share Posted June 13, 2007 (edited) Hi, Don't know if it helps... I did an on event mode 1 example of min to tray, tray to gui. (since the other example is in on event mode 0) expandcollapse popup#include <GuiConstants.au3> #Include <Constants.au3> Opt("TrayMenuMode",1) Opt("TrayOnEventMode",1) Opt("GUIOnEventMode", 1) ;----- Gui ---- $Main = GuiCreate("Minimize To Tray", 300, 200, -1, -1) GUISetOnEvent($GUI_EVENT_MINIMIZE, 'GuiEvent') GUISetOnEvent($GUI_EVENT_CLOSE, 'GuiEvent') GUISetState(@SW_SHOW, $Main) ;------ Tray Menu ---- $Show = TrayCreateItem("Show Gui") TrayItemSetOnEvent(-1, 'TrayEvent') TrayCreateItem("") $Exit = TrayCreateItem("Exit") TrayItemSetOnEvent(-1, 'TrayEvent') TraySetState(2) While 1 Sleep(10) WEnd Func GuiEvent() Select Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE GUISetState(@SW_HIDE, $Main) TraySetState(1) Case @GUI_CtrlId = $GUI_EVENT_CLOSE Exit EndSelect EndFunc Func TrayEvent() Select Case @TRAY_ID = $Show GUISetState(@SW_SHOW, $Main) GUISetState(@SW_RESTORE, $Main) TraySetState(2) Case @TRAY_ID = $Exit Exit EndSelect EndFunc Cheers Edited June 13, 2007 by smashly Link to comment Share on other sites More sharing options...
Zedna Posted June 13, 2007 Share Posted June 13, 2007 Another example is my NET SEND GUI Resources UDF ResourcesEx UDF AutoIt Forum Search 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