Sign in to follow this  
Followers 0
Daniel W.

Creating A Gui From Existing Gui

6 posts in this topic

#1 ·  Posted (edited)

Hi,

i got my Programm working now but it creates a new GUI if i click on a button.

In this new GUI all works fine and so on but when i try to close the new GUI i must double click at the [X] of the window to close it or i click on the Exit Button.

When it closes the other GUI closes too.

In both GUI's i use this to close

Select 
//........
Case $msg = $exitID
Exit
Case $msg = $GUI_EVENT_CLOSE
Exit
EndSelect

My whole code is at the end of post.

Which code do i need that only the GUI from which i press the exit button is closed?

Edited by Daniel W.

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites



example

Case $msg = $GUI_EVENT_CLOSE
If WinActive("main") then 
    Exit
Else
    GUISetState( @SW_HIDE, $gui2)
EndIf
EndSelect

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

$gui2 = ????

Looks fine but i don't know how this is defined :think:


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites

you could use the title of the second window

or

$gui2 = guicreate( " my second window......

then use $gui2 which is the control handle

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Wow thank you it works now

Thread can be closed


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites

Wow thank you it works now

Thread can be closed

Welcome

8)


NEWHeader1.png

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