EmptySpace Posted May 27, 2012 Share Posted May 27, 2012 How to explain... I want to make GUI to be able to be visible and not visible. Not visible it would be like $oIE = _IECreate("www.google.lt,0,0) <--- these 0 makes it not visible. And it would be controled from tray like making TrayCreateMenu("Settings") TrayCreateItem("Display") TrayCreateItem("Show") So how I could make it? I should make something with GUISetState? Link to comment Share on other sites More sharing options...
EmptySpace Posted May 27, 2012 Author Share Posted May 27, 2012 Ok, GUISetState works. But now other question how to make it to switch after clicking on tray? For example gui is visible and you click directly on tray and then gui hides after clicking second time it shows again? Link to comment Share on other sites More sharing options...
stormbreaker Posted May 28, 2012 Share Posted May 28, 2012 Something like this: ;Originally written by Zedna #NoTrayIcon #include <GuiConstants.au3> #include <Constants.au3> #include <WindowsConstants.au3> Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) TraySetOnEvent($TRAY_EVENT_PRIMARYUP,"Event") GuiCreate("MKISH's Example", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_MINIMIZE GuiSetState(@SW_HIDE) TraySetState(1) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Func Event() GuiSetState(@SW_Show) TraySetState(2) EndFunc ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1 Link to comment Share on other sites More sharing options...
EmptySpace Posted May 28, 2012 Author Share Posted May 28, 2012 Thanks! 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