devilyn Posted March 12, 2006 Share Posted March 12, 2006 Hi is there any way to create two gui's at the same time. like a main app window and a toolbar window? Link to comment Share on other sites More sharing options...
greenmachine Posted March 12, 2006 Share Posted March 12, 2006 Creating multiple GUIs is simple - just call GUICreate multiple times. Controlling them is a bit harder. Read the helpfile for more of that info. Link to comment Share on other sites More sharing options...
eynstyne Posted March 12, 2006 Share Posted March 12, 2006 (edited) Yes. I'm currently working on a project which requires two windows... #include <Guiconstants.au3> $gui = GuiCreate("Window 1",200, 200, -1, -1, -1); Main gui Guisetstate() While 1 $msg2 = Guigetmsg() Select case $msg2 = $GUI_EVENT_CLOSE exit endselect $gui2 = GuiCreate("Window 2",200,200, -1, -1, $WS_SYSMENU, $WS_EX_TOOLWINDOW); Toolbar window guisetstate() While 2 $msg = Guigetmsg() Select case $msg = $GUI_EVENT_CLOSE exit; Or you could hide it with Winsetstate() endselect wend wend Hope it works out for you Edited March 12, 2006 by eynstyne F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
Nuffilein805 Posted March 13, 2006 Share Posted March 13, 2006 try: $main = guicreate("Main", 300, 300) $but = guictrlcreatebutton ("Button", 10, 10) guisetstate() $child = guicreate ("2nd", 300, 300, 0, 0, -1, -1, $main) $minibut = guictrlcreatebutton ("Button 2", 10, 10) guisetstate() while 1 $msg = guigetmsg() if $msg = $GUI_EVENT_CLOSE and winactive ($main) then exit if $msg = $GUI_EVENT_CLOSE and winactive ($child) then msgbox (0, "Child", "Exit called") if $msg = $but then msgbox (0, "Button pressed", "Button on Main-GUI pressed!") if $msg = $minibut then msgbox (0, "Button pressed", "Button on 2nd GUI pressed!") wend this should cover your questions my little chatmy little encryption toolmy little hidermy unsafe clickbot 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