soyfelix Posted January 29, 2008 Share Posted January 29, 2008 (edited) hello, my english is very bad but i'll try. I`d like learn to code two or more GUI in one. Now i`m coding in several indepent scripts but i'd like to code them in only one, is poissible?? thnaks!!!!! Edited January 29, 2008 by soyfelix Link to comment Share on other sites More sharing options...
Zedna Posted January 29, 2008 Share Posted January 29, 2008 Here is base concept:Core is to use GUIGetMsg(1); http://www.autoitscript.com/forum/index.php?showtopic=5127&hl #include "GUIConstants.au3" $parentgui = GUICreate("Parent",400,300) GUISetState(@SW_SHOW) $childgui = GUICreate("Child",340,120,-1,-1,BitOr($WS_POPUP,$WS_CAPTION,$WS_SYSMENU),-1,$parentgui) GUISetState(@SW_SHOW) GUISwitch($parentgui) GUISetState(@SW_DISABLE) While 1 $msg = GUIGetMsg(1) $ctrlmsg = $msg[0] $win = $msg[1] $posx = $msg[3] $posy = $msg[4] Select Case $ctrlmsg = $GUI_EVENT_CLOSE And $win = $parentgui ExitLoop Case $ctrlmsg = $GUI_EVENT_CLOSE And $win = $childgui GUISwitch($parentgui) GUISetState(@SW_ENABLE) GUISwitch($childgui) GUISetState(@SW_HIDE) EndSelect WEnd GUIDelete() Exit Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
soyfelix Posted January 30, 2008 Author Share Posted January 30, 2008 Here is base concept: Core is to use GUIGetMsg(1) ; http://www.autoitscript.com/forum/index.php?showtopic=5127&hl #include "GUIConstants.au3" $parentgui = GUICreate("Parent",400,300) GUISetState(@SW_SHOW) $childgui = GUICreate("Child",340,120,-1,-1,BitOr($WS_POPUP,$WS_CAPTION,$WS_SYSMENU),-1,$parentgui) GUISetState(@SW_SHOW) GUISwitch($parentgui) GUISetState(@SW_DISABLE) While 1 $msg = GUIGetMsg(1) $ctrlmsg = $msg[0] $win = $msg[1] $posx = $msg[3] $posy = $msg[4] Select Case $ctrlmsg = $GUI_EVENT_CLOSE And $win = $parentgui ExitLoop Case $ctrlmsg = $GUI_EVENT_CLOSE And $win = $childgui GUISwitch($parentgui) GUISetState(@SW_ENABLE) GUISwitch($childgui) GUISetState(@SW_HIDE) EndSelect WEnd GUIDelete() Exit Exactly!!!!!!! I was looking for somethig like this, i`m going to study your code. THANKSSSSSSSSSSSSSSSSSSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 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