Sign in to follow this  
Followers 0
Der_Andi

Child-Window closed --> Parent-Window disappears

5 posts in this topic

Hi,

i have i little problem with a script, that uses 2 GUIs.

the parent window is always present and one of its button opens the child window.

While the child-gui is open, the user should not be able to work with the parent-gui.

It's like opening the Settings in Microsoft Word. You must close Settings, to continue with your letter...

What i have so far:

the parent-gui has no styles defined.

the child-gui has $DS_Modalframe as "style", no "ex_style", and the parent-guihandle as "parent".

When i click the button to open the child-gui, the parent becomes disabled.

In the child-gui there are 2 specific buttons. These buttons close the child-gui and enables the parent-gui again.

The problem: when the child-gui is closed, the parent-gui is put behind another window.

I could WinActivate() the parent-gui but that looks... --> :lmao:

Is there a cleaner solution to handle this?

Andi

Share this post


Link to post
Share on other sites



Is there a cleaner solution to handle this?

"GUISetState(@SW_SHOW,<GUI-window handle>)" perhaps ?

Share this post


Link to post
Share on other sites

"GUISetState(@SW_SHOW,<GUI-window handle>)" perhaps ?

i already tried, but this does not help.

Share this post


Link to post
Share on other sites

These two command generally do what you are asking

GUISetState(@SW_SHOW, $mainwindow)

GUISetState(@SW_ENABLE, $mainwindow)

Share this post


Link to post
Share on other sites

These two command generally do what you are asking

GUISetState(@SW_SHOW, $mainwindow)

GUISetState(@SW_ENABLE, $mainwindow)

sorry, but they do not.

i have them already in my code, but when i close the child-gui, the parent-gui disappears behind another window...

uhh... i just tested @SW_RESTORE instead of @SW_SHOW.

And you know what? That works! :ph34r:

Thanks for your help :lmao:

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