Jump to content
Sign in to follow this  
Krakatoa

Problem with close three opening windows - please help

Recommended Posts

Krakatoa

Problem with close three opening windows

Open window example1 ... open window example2 ... close (storno) example2 ... close (storno) example1

= OK

Open window example1 ... open window example2 ... open window example3 ... close (storno) example3 (no problem) ... close (storno) example2

= PROBLEM ... close example2 no close :_-(

Please, Help! No problem with:

Open window example1 ... open window example2 ... open window example3 ... close (storno) example3 ... close (storno) example2 ... close (storno) example1

problem script:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Example1()

Func Example1()
    Local $button01, $button02, $msg
    GUICreate("Example1", 300, 150)
    $button01 = GUICtrlCreateButton("New", 50, 70, 50, 20)
    $button02 = GUICtrlCreateButton("Storno", 200, 70, 50, 20)
    GUISetState()
    While 1
        $msg = GUIGetMsg()
        If $msg = $button01 Then Example2()
        If $msg = $button02 Then ExitLoop
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()
EndFunc

Func Example2()
    Local $button01, $button02, $msg
    GUICreate("Example2", 300, 150)
    $button01 = GUICtrlCreateButton("New", 50, 70, 50, 20)
    $button02 = GUICtrlCreateButton("Storno", 200, 70, 50, 20)
    GUISetState()
    While 1
        $msg = GUIGetMsg()
        If $msg = $button01 Then Example3()
        If $msg = $button02 Then ExitLoop
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()
EndFunc

Func Example3()
    GUICreate("Example3", 300, 150)
    Local $button02, $msg
    $button02 = GUICtrlCreateButton("Storno", 200, 70, 50, 20)
    GUISetState()
    While 1
        $msg = GUIGetMsg()
        If $msg = $button02 Then ExitLoop
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()
EndFunc

Thanks, help.

Share this post


Link to post
Share on other sites
Krakatoa

:-)

No Problem:

...

$GUICreate = GUICreate ("Example2", 300, 150)

...

GUIDelete ($GUICreate)

...

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  

×