DexterMorgan Posted March 12, 2008 Share Posted March 12, 2008 (edited) Hi all, i was wondering if there is a way to minimize a GUI to the traybar and when you click on the traybar icon it would open up again. Thank you for your help Lol guess its not possible thank you anyways Edited March 12, 2008 by Nooblet code Link to comment Share on other sites More sharing options...
spudw2k Posted March 12, 2008 Share Posted March 12, 2008 Like this? #include <GUIConstants.au3> Opt("TrayIconHide",1) Opt("TrayMenuMode",1) $trayrestore = TrayCreateItem("Restore") TrayCreateItem("") $trayexit = TrayCreateItem("Exit") $gui = GuiCreate("WindowName") GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_MINIMIZE then Opt("TrayIconHide",0) WinSetState("WindowName","",@SW_HIDE) While 1 $traymsg = TrayGetMsg() if $traymsg = $trayrestore Then Opt("TrayIconHide",1) WinSetState("WindowName","",@SW_SHOW) WinSetState("WindowName","",@SW_RESTORE) ExitLoop EndIf if $traymsg = $trayexit then Exit EndIf WEnd EndIf If $msg = $GUI_EVENT_CLOSE Then Exit WEnd Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Swift Posted March 12, 2008 Share Posted March 12, 2008 #NoTrayIcon $GUI = GUICreate("") GUISetState() Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 1) #include <Constants.au3> #include <GUIConstants.au3> $Label1 = GUICtrlCreateLabel("", 15, 88, 346, 41, $SS_CENTER) GUICtrlSetFont(-1, 65, 400, 0, "MS Sans Serif") TraySetOnEvent($TRAY_EVENT_PRIMARYUP, "Minimize") AdlibEnable("Time", 1000) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MINIMIZE GUISetState(@SW_HIDE, $GUI) TraySetState(1) EndSwitch WEnd Func Minimize() TraySetState(2) GUISetState(@SW_SHOW, $GUI) GUISetState(@SW_RESTORE, $GUI) EndFunc ;==>Minimize Func Time() $Time = @Hour & ":" & @MIN & ":" & @SEC GUICtrlSetData($Label1, $Time) WinSetTitle($GUI, "", $Time & " Is The Current Time") EndFunc Link to comment Share on other sites More sharing options...
spudw2k Posted March 12, 2008 Share Posted March 12, 2008 There's two examples. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Swift Posted March 12, 2008 Share Posted March 12, 2008 I like mine better Link to comment Share on other sites More sharing options...
spudw2k Posted March 12, 2008 Share Posted March 12, 2008 you would, you wrote it Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF 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