>Hi Ed,
>
>Thank you for your answer. Im writing a VB application which uses API to execute some windows and DOs programs. I didnt know which API function notifies me when it's done executing. Finally it worked with CreateProcess(),WaitForSingleObject() and GetExitCodeProcess.
>
Do yourself a favor a pick up a copy of Dan Appleman's
Visual Basic Programmer's Guide to the WIn32 API; there's sample code for replacing this in there, and it's a good Win32 reference in and of itself.
Just out of curiousity, why post this on UT in the VFP forum? It probably would've made more sense to post it to the VB forum or one of the MS VB newsgroups. And if I'd known it was VB, exact code could've been referenced.