Sign in to follow this  
Followers 0
huldu

Sister window question

3 posts in this topic

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



#2 ·  Posted (edited)

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

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  
Followers 0