cmrobertson
asked on
Detect WM_CLOSE event in vb6
I need to know when a particular process has shut down so I can shut down my running vb6 program
ASKER
I haven't abandoned the question, sorry i got busy and havent had a chance to try this - I am going to work on it in the next day or so and wanted to leave open in case i need a follow up question
Sure no problem. The only question I have is how you are opening the application.
Do you want to open the application from within your program.
Are you trying to do this on a program that is already running before your program starts.
The above will help when creating an example but a couple of things have to be altered depending on which reflects how you launch the program.
Do you want to open the application from within your program.
Are you trying to do this on a program that is already running before your program starts.
The above will help when creating an example but a couple of things have to be altered depending on which reflects how you launch the program.
ASKER
I more than likely will be shelling to the application from inside my vb project
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent, exactly what I was looking for - Thanks!
If the process in question is already running before your process then the above applies. You will also need the Process ID you can either use CreateToolHelp32() to find the PID by name or FindWindow() and GetWindowThreadProcessId()
However if you launc the application from your exe than you can use the Shell() command which will return you the process id.