Jump to content
Sign in to follow this  

Attaching another window as a child to my GUI

Recommended Posts


My GUI relies on a 3rd party application to run properly. How can look for the closing action of the other application, and perform actions based on it?

i.e. User goes to close the other application, my application brings up the exit confirmation (and does not close the other application unless the user confirms it).

Currently I've set it so that the program errors out if the other application is closed, but this can be cumbersome at times for the average user.

Edited by mechaflash213


“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”


Share this post

Link to post
Share on other sites


AdlibRegister(PreventClosing,250) ; run that function 4 times per second (default)

Func PreventClosing()
    Local $Title = "Title of exit dialog, other application"
    Local $Text = "Text of exit dialog, other application"
    If WinExists($Title, $Text) Then
        ; do whatsoever is appropriate here
EndFunc   ;==>PreventClosing

if there is no exit confirmation dialog for the other application, then use WinExists($title,$text) to monitor, if the other application is still running.

Or start it with $PID=run("c:pathtoother-application.exe") and use ProcessExists($PID) for monitoring.

Regards, Rudi.

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.