Link to home
Start Free TrialLog in
Avatar of jana
janaFlag for United States of America

asked on

Exit a vb6 apps when a calling it apps closes

Hi,

We have an apps that calls another vb6 apps passing data for processing.  Is there a way for vb6 apps to detect if the calling apps closes or no more in memory? (that way we can close the apps)
Avatar of Chris Watson
Chris Watson
Flag of United Kingdom of Great Britain and Northern Ireland image

Are you wanting to close the child application when the parent application closes, or close the parent application when the child application closes?
Avatar of jana

ASKER

Exactly!
SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

Yes, makes sense but that means that the apps has to be constantly searching that value in order to know that parent apps closed; thus, an another thing to consider into coding.  Is there another way, or maybe your way but to consider the apps not to be constantly looking at that value?

Please advice.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

No, of course, that part is understood, it's that your recommendation requires the apps to be constantly reading the text file to see if the user exited from the parent apps, unless we didn't understand your recommendation.

Is what you recommended requires for the child apps to constantly read the text file?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

Yes that makes sense, we go there, thanx!
Avatar of jana

ASKER

No, wait, still have the same problem: the child apps will have to constantly look into the registry to see if the parent apps closed.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

Yes, that is also good; all are great as a matter of fact, it's the process of constantly looking to the location to see if the parent apps closed.

Don't know if we are transferring to you guys our concern .
No, wait, still have the same problem: the child apps will have to constantly look into the registry to see if the parent apps closed.
Yes that's true.

You have only two options which are either having the called app constantly looking for an indicator that the calling app has closed which is time consuming, or have the calling app close the called app as I suggested in post ID: 41872505.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

Yes, sorry guys, didn't read correct the first.  We can do that, kill the apps from the parent.

Thanx!
You're welcome and I'm glad I was able to help.

If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.

Marty - Microsoft MVP 2009 to 2016
              Experts Exchange MVE 2015
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2015