Need to know when a program has been closed
I have a program in Visual Basic (P1) that needs to detect when a certain program P2 (developed in VC++) gets closed.
This programs P2 can be opened in any time during the execution of P1. P2 is launched from a third program P3 (VC++).
Since the program I need to detect its closing (P2) is set as TOPMOST,
I've tried to catch the form_focused event from P1 so it would detect
when the P2 is closed and the P1 gets the focus. But it didn't work. It
only entered the form_focused at the begining of the P1. What I'm doing
wrong?
Is there other way to know when P2 is closed?
Is there any way that P3 can notify P1 that P2 has been closed?
Thanks in advance.

