Jump to content

Need GUI help


Innocuous
 Share

Recommended Posts

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

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.

Link to comment
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?

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...