Jump to content
Sign in to follow this  
huldu

Sister window question

Recommended Posts

huldu

Ive figured out how to open a window in a window. The problem is i cant figure out how to shut down the second window (sister window?).

Ive tried: GUISwitch(), GUISetState(), GUIDelete()... but i probably did it all wrong.

Any help would be very appreciated :P

I use GUISwitch($sister_window) to open the sister window, followed by a GUISetState(). At the end of the func i did a GUIDelete($sister_window) but nothing happend (window was still up).


"I'm paper, rock is fine, nerf scissors!!!"

Share this post


Link to post
Share on other sites
Helge

It's called child, and a simple GUIDelete or GUISetState should work great,

the use of course depends if you want to use the window later or not...

$hWnd = GUICreate("I'm your mother !")
$hWndC = GUICreate("bagoogoo")

GUIDelete($hWndC)

Edit : I have this little feeling..

Edited by Helge

Share this post


Link to post
Share on other sites
huldu

Thanks for the help!

If anyone is interested in knowing how it looks:

#include <GUIConstants.au3>
$Mother = GUICreate("Mother", 200, 100, 283, 323) 
$button1 = GUICtrlCreateButton ("Create",16, 16, 75, 25)
$Sister = GUICreate("Sister", 150, 80, 200, 300)
$button2 = GUICtrlCreateButton ("Kill",16, 16, 75, 25)
GUISetState(@SW_SHOW, $Mother)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
        
        Case $msg = $button1
        GUISetState(@SW_SHOW, $Sister)
        
        Case $msg = $button2
        GUISetState(@SW_SHOW, $Mother)
        GUISetState(@SW_HIDE, $Sister)
    EndSelect
Wend

Works like a charm :P


"I'm paper, rock is fine, nerf scissors!!!"

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  

×