BlackMore Posted July 15, 2008 Posted July 15, 2008 Hi, i would like to know if it's possible to hide the window in the start menu but keep it opened (like TeamSpeak does for exemple) and in the that case, how may i do it? thanks in advance
JFee Posted July 15, 2008 Posted July 15, 2008 What do you mean by hide it in the start menu? Regards,Josh
BlackMore Posted July 15, 2008 Author Posted July 15, 2008 The tab that opens in the start menu once you open the script or any other program.
BlackMore Posted July 15, 2008 Author Posted July 15, 2008 yeah thats it my bad... sry i got a bit confused
JFee Posted July 15, 2008 Posted July 15, 2008 What happens if you give the window the $WS_CHILD style? Regards,Josh
BlackMore Posted July 15, 2008 Author Posted July 15, 2008 The gui don't even show but the windows show aswell but i need the gui visible
Paulie Posted July 15, 2008 Posted July 15, 2008 Is this what you were after? A proof of concept: #include <WindowsConstants.au3> Opt("TrayAutoPause",0) Opt("TrayMenuMode",1) $GUI = GuiCreate("Test", 200,100) $Menu = TrayCreateMenu("Display") $Hide = TrayCreateItem("Hide", $menu) $Show = TrayCreateItem("Show", $menu) $Exit = TrayCreateItem("Exit") GUISetState() While 1 $gMsg=GUIGetMsg() $tMsg=TrayGetMsg() Switch $gmsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MINIMIZE WinSetState($GUI,"",@SW_HIDE) EndSwitch Switch $tmsg Case $Hide WinSetState($GUI,"",@SW_HIDE) Case $Show WinSetState($GUI,"",@SW_Show) WinSetState($GUI,"",@SW_RESTORE) Case $Exit Exit EndSwitch WEnd (Check out the Tray Icon)
BlackMore Posted July 15, 2008 Author Posted July 15, 2008 Is this what you were after? A proof of concept: #include <WindowsConstants.au3> Opt("TrayAutoPause",0) Opt("TrayMenuMode",1) $GUI = GuiCreate("Test", 200,100) $Menu = TrayCreateMenu("Display") $Hide = TrayCreateItem("Hide", $menu) $Show = TrayCreateItem("Show", $menu) $Exit = TrayCreateItem("Exit") GUISetState() While 1 $gMsg=GUIGetMsg() $tMsg=TrayGetMsg() Switch $gmsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MINIMIZE WinSetState($GUI,"",@SW_HIDE) EndSwitch Switch $tmsg Case $Hide WinSetState($GUI,"",@SW_HIDE) Case $Show WinSetState($GUI,"",@SW_Show) WinSetState($GUI,"",@SW_RESTORE) Case $Exit Exit EndSwitch WEnd (Check out the Tray Icon) that gives me error at line 16 and 18 :s
Paulie Posted July 15, 2008 Posted July 15, 2008 Oops, forgot about the new include system add this at the top of the script #include <GuiConstantsEx.au3>
BlackMore Posted July 15, 2008 Author Posted July 15, 2008 It's almost that but what i need is when i choose hide the GUI keps active but hide in the task bar...
Paulie Posted July 15, 2008 Posted July 15, 2008 You can make it a $WS_EX_TOOLWINDOW, however, that will only prevent it from making a taskbar button... it won't hide one once it's been created i don't think...
BlackMore Posted July 15, 2008 Author Posted July 15, 2008 $WS_EX_TOOLWINDOW removed the minimize, maximize and close buttons only the task bar button happered anyway
Paulie Posted July 15, 2008 Posted July 15, 2008 I meant like this. No Taskbar here. #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> Opt("TrayAutoPause",0) Opt("TrayMenuMode",1) $GUI = GuiCreate("Test", 200,100) GUISetStyle(-1, $WS_EX_TOOLWINDOW) $Menu = TrayCreateMenu("Display") $Hide = TrayCreateItem("Hide", $menu) $Show = TrayCreateItem("Show", $menu) $Exit = TrayCreateItem("Exit") GUISetState() While 1 $gMsg=GUIGetMsg() $tMsg=TrayGetMsg() Switch $gmsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MINIMIZE WinSetState($GUI,"",@SW_HIDE) EndSwitch Switch $tmsg Case $Hide WinSetState($GUI,"",@SW_HIDE) Case $Show WinSetState($GUI,"",@SW_Show) WinSetState($GUI,"",@SW_RESTORE) Case $Exit Exit EndSwitch WEnd
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