>I am useing ShellExecute to run an application that compresses a PDF file. Once the compressed file is created, I do a FileToString on it and store the string to a memo.Then I delete the compressed file.
>
>Depending upon the size of the original PDF, the process might take a fraction of a second or several minutes.
>
>The problem is that I need to wait until the compression is complete before I do any processing of the finished compressed PDF file.
>
>SHellExecute is not modal and I need to wait for it to finish before processing the result. ShellExecute returns a window handle. I tried using the API IsWindow(Handle) but it always returns 0.
>
>Does anyone know how to ask the question: Is the external process finished?
One way, instad of ShellExecute use Windows Scripting host Run:
oShell = CREATEOBJECT([WScript.Shell])
oShell.Run([Your executable with parameters], 3, .t.)
If yoo don't want to use WScript here in download section there is a class named API_APPRUN in .VCX form Download #
9477
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.