Sign in to follow this  
Followers 0
Rodger

More than one window

4 posts in this topic

#1 ·  Posted (edited)

Hello,

I have made a main Window with a menu-item. Every time I click on the menu-item it opens a new window which should be the case. But .... when I close one of windows which was opened by the menu-item, it closes everything in stead of only that specific one.

How can I solve this, it would be nice if you can give me an example.

Thxs,

Rodger

Edited by Rodger

Share this post


Link to post
Share on other sites



You have something like

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

or

If $msg = $GUI_EVENT_CLOSE Then Exit

in you script. Both GUIs sent the $GUI_EVENT_CLOSE while closing, so you have to enhance that part to something like

If $msg = $GUI_EVENT_CLOSE Then

if WinActive($GUI_Main) then

exit

else

guidelete($GUI_Menu)

endif

endif

Hard to say the syntax needed without a sample :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I was a little bit to quick.

The moment I closed one of the extra opened window, I can't close the other extra opened window(s) any more because the Gui has been deleted. Next to that, it closes always the first extra opened window and not the window you want to close.

Edited by Rodger

Share this post


Link to post
Share on other sites

I found the solution:

The last GuiDelete() should be :

GUIDelete(WinGetHandle(WinGetTitle("")))

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