nyke0 Posted September 2, 2014 Share Posted September 2, 2014 Hello, I have 2 GUIs in my script. If I start the second, I can click to the first GUI to hide/overlap the second GUI. How I can force the second GUI to finish it before I can click back to the first GUI? For example: 1st GUI is started, 2nd GUI ist also started, then I click to the 1st GUI and then come the 2nd GUI to the foreground. Link to comment Share on other sites More sharing options...
devilman16 Posted September 2, 2014 Share Posted September 2, 2014 Give the second GUI the sytle $WS_EX_TOPMOST Example: GUICreate("GUI2", 400, 400,@DesktopWidth/2-200, @DesktopHeight/2-200, $WS_EX_TOPMOST) Link to comment Share on other sites More sharing options...
nyke0 Posted September 2, 2014 Author Share Posted September 2, 2014 I did it by myself: If WinGetTitle('', '') = '1st GUI' Then WinActivate('2nd GUI', '') Link to comment Share on other sites More sharing options...
Solution UEZ Posted September 2, 2014 Solution Share Posted September 2, 2014 You can set the 2nd GUI as a child GUI of the 1st one: #include <GUIConstantsEx.au3> $hGUI1 = GUICreate("Primary", 600, 400) GUISetState(@SW_SHOW, $hGUI1) $hGUI2 = GUICreate("Secondary", 300, 200, -1, -1, Default, Default, $hGUI1) GUISetState(@SW_SHOW, $hGUI2) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ 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