Running an External Application and waiting until it's done

R

Rico

Hello,

I have an Access application and I would like to not only run an external
application, but at the point in the code where it is run, I'd like to wait
for the external applicaiton to finish, then run the rest of the code.

Is there any way to do this?

Thankis!
Rick
 
T

tombsy

Rick
Yes,
I have done this using a form of type "dialog" which allows the code to
wait and using application handles.

You need to get the application handle of the external application (which
you have shelled) and every second or so, test to see if the handle number
is still present.
If it is, then wait for a second and when the handle is no longer present
you know your code can continue so close the dialog form

Sounds easy but takes a bit of code(which I dont have to hand).

I get plenty of code chunks from here which might get the bit you need.
http://vbnet.mvps.org/index.html?code/fileapi/index.html


Sorry i dont have the code, but someone else might
 
C

CDMAPoster

Rico said:
Hello,

I have an Access application and I would like to not only run an external
application, but at the point in the code where it is run, I'd like to wait
for the external applicaiton to finish, then run the rest of the code.

Is there any way to do this?

Thankis!
Rick

Some additional information can be found here:

http://support.microsoft.com/kb/129796

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvb4/html/msdn_shelexec.asp

James A. Fortune
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top