Innocuous Posted September 29, 2007 Share Posted September 29, 2007 So im making this gui, with a button. If i press it, it will make a new gui / a gui child. Well it does work, but when i close the guichild again (with GUIDelete), then its deleted for good. I cant press the button on the main gui, and create the child again, before ive exited the script and started it again.... Any1 knows why? Link to comment Share on other sites More sharing options...
Uten Posted September 29, 2007 Share Posted September 29, 2007 Maybe you could post some test code? Ans as a note for later you have posted in the wrong forum. There is one dedicated to GUI questions.. Post some sample code demonstrating the problem and I will help you out. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Killer Posted September 30, 2007 Share Posted September 30, 2007 (edited) After GUIDelete() you need to add in ExitLoop. Edited October 1, 2007 by Killer Link to comment Share on other sites More sharing options...
tankmann Posted September 30, 2007 Share Posted September 30, 2007 Why don't you just hide the child GUI with GuiCtrlSetState($GUI-handle, @SW_HIDE) ? Or is there an urgent to kill this GUI definitely? Link to comment Share on other sites More sharing options...
Killer Posted October 1, 2007 Share Posted October 1, 2007 Why don't you just hide the child GUI with GuiCtrlSetState($GUI-handle, @SW_HIDE) ?Or is there an urgent to kill this GUI definitely?Isn't it logical to close the window when you have finished with it than left it hidden? Link to comment Share on other sites More sharing options...
JBeef Posted October 1, 2007 Share Posted October 1, 2007 (edited) you do lots of gui? or one? one$gui = GUICreate("test") $btn = GUICtrlCreateButton("new gui",0,0) GUISetState() While 1 $msg = GUIGetMsg() If $msg = -3 Then Exit If $msg = $btn Then guicousin() WEnd Func guicousin() GUISetState(@SW_DISABLE,$gui) $guicousin = GUICreate("test_tickle",400,400,0,0,Default,Default,$gui) GUISetState(@SW_SHOW,$guicousin) GUISwitch($guicousin) While 1 $message = GUIGetMsg() If $message = -3 Then ExitLoop WEnd GUIDelete($guicousin) GUISwitch($gui) GUISetState(@SW_ENABLE,$gui) WinActivate($gui) EndFunclots is crazy. ~Jap Edited October 1, 2007 by JBeef 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