FinalVersion Posted May 30, 2009 Share Posted May 30, 2009 (edited) Basically when I click on settings in the tray menu, and the close button the the gui that opens, I want the gui to like close but the program not exit, and I don't really want to just "hide" the gui, thanks. Current Code: expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.1.0 (beta) Author: Godly Script Function: Alt Tabs When Mouse In Defined Spot #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 1) $iSettings = TrayCreateItem("Settings") $iSep1 = TrayCreateItem("") $iAbout = TrayCreateItem("About") $iExit = TrayCreateItem("Exit") TrayItemSetOnEvent($iSettings, "Settings") TrayItemSetOnEvent($iAbout, "About") TrayItemSetOnEvent($iExit, "End") TraySetState() While 1 Sleep(30) WEnd Func End() Exit EndFunc ;==>End Func Settings() $frmSettings = GUICreate("Settings", 303, 201, -1, -1, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS)) $Group1 = GUICtrlCreateGroup("Main"a, 8, 0, 289, 193, -1, $WS_EX_TRANSPARENT) $cbReload = GUICtrlCreateCheckbox("Reload On Save", 16, 24, 113, 17) $Label1 = GUICtrlCreateLabel("X Location:", 16, 56, 58, 17) $Label2 = GUICtrlCreateLabel("Y Location:", 16, 80, 58, 17) $xLoc = GUICtrlCreateInput("0", 80, 54, 30, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL)) $yLoc = GUICtrlCreateInput("0", 80, 78, 30, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL)) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ;GUISetState(@SW_HIDE) ExitLoop EndSwitch WEnd EndFunc ;==>Settings Func About() MsgBox(0, "bb", "bb") EndFunc ;==>About Edited May 30, 2009 by Godly [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
James Posted May 30, 2009 Share Posted May 30, 2009 Refer to GuiSetState in the Help File. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
DCCD Posted May 30, 2009 Share Posted May 30, 2009 maybe! #include <GUIConstants.au3> GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then GUISetState (@SW_HIDE) Wend [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
James Posted May 30, 2009 Share Posted May 30, 2009 @SW_HIDE will only hide the GUI, it will still be there, but it's hidden. Use @SW_SHOW to show it again. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
FinalVersion Posted May 30, 2009 Author Share Posted May 30, 2009 Refer to GuiSetState in the Help File.Already Have... [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
James Posted May 30, 2009 Share Posted May 30, 2009 Already Have...Then read above. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
FinalVersion Posted May 30, 2009 Author Share Posted May 30, 2009 Then read above.Read my first post, I don't want to use SW_HIDE... [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
James Posted May 30, 2009 Share Posted May 30, 2009 Read my first post, I don't want to use SW_HIDE...WinSetTrans() Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
AoRaToS Posted May 30, 2009 Share Posted May 30, 2009 GUIDelete($GUI) ? s!mpL3 LAN Messenger Current version 2.9.9.1 [04/07/2019] s!mpL3 LAN Messenger.zip s!mpL3 Link to comment Share on other sites More sharing options...
FinalVersion Posted May 30, 2009 Author Share Posted May 30, 2009 GUIDelete($GUI) ?Lol, Thankyou... [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
James Posted May 30, 2009 Share Posted May 30, 2009 Lol, Thankyou...That's not hiding, that's removing it AND the controls. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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