Sign in to follow this  
Followers 0
Innocuous

Need GUI help

6 posts in this topic

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?

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

After GUIDelete() you need to add in ExitLoop.

Edited by Killer

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

#6 ·  Posted (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)
EndFunc
lots is crazy. ~Jap Edited by JBeef

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0