FMS Posted May 30, 2011 Posted May 30, 2011 Dear reader, I've a little problem that could solved easily i ques.... But i'm making a script whit a child GUI and when i close this child the whole script ends :S and what i want to do is just closing the child GUI :S ... could someone help me whit this? simplefied i got this : #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 633, 454, 192, 114) $Button1 = GUICtrlCreateButton("Button1", 96, 64, 361, 65, $WS_GROUP) GUISetState(@SW_SHOW) $GUI = GUICreate("Form2", 133, 154, 192, 114) Global $Show = False While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $Show = Not $Show GUISetState($Show, $GUI) EndSwitch WEnd thnx in advanced as finishing touch god created the dutch
ahmet Posted May 30, 2011 Posted May 30, 2011 Try with this#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 633, 454, 192, 114) $Button1 = GUICtrlCreateButton("Button1", 96, 64, 361, 65, $WS_GROUP) GUISetState(@SW_SHOW) $GUI = GUICreate("Form2", 133, 154, 192, 114) Global $Show = True While 1 $nMsg = GUIGetMsg(1) Switch $nMsg[1] Case $Form1 Switch $nMsg[0] Case $GUI_EVENT_CLOSE Exit Case $Button1 ;~ $Show = Not $Show GUISetState(@SW_SHOW, $GUI) EndSwitch Case $GUI Switch $nMsg[0] Case $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $GUI) EndSwitch EndSwitch WEndLook also here. I don't know how this works GUISetState($Show, $GUI)
UEZ Posted May 30, 2011 Posted May 30, 2011 Try this: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 633, 454, 192, 114) $Button1 = GUICtrlCreateButton("Button1", 96, 64, 361, 65, $WS_GROUP) GUISetState(@SW_SHOW, $Form1) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $GUI = GUICreate("Form2", 133, 154, 192, 114, Default, Default, $Form1) GUISetState(@SW_SHOW, $GUI) GUISetState(@SW_DISABLE, $Form1) Do $nMsg = GUIGetMsg() Until $nMsg = $GUI_EVENT_CLOSE GUISetState(@SW_ENABLE, $Form1) GUIDelete($GUI) EndSwitch WEnd 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
FMS Posted May 31, 2011 Author Posted May 31, 2011 thnx for those 2 approaches they worked both thnx some more learning materials as finishing touch god created the dutch
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