michaelkatz
Programmer
I am using ShellExecute to print a PDF file. I gave up on trying to close adobe Acrobat when the printing is done.
I also want to delete the file after it is printed. However, the file is in use until released by ShellExecute and the Delete command fails, or the delete command executes too quickly and ShellExecute cannot find the file. I tried using the following code:
DO WHILE FILE(cFile) = .T.
DELETE FILE cFile
enddo
Problem: Takes very long. Appears The Delete command and ShellExecute are fighting for processor time.
I tried using a progress bar.=, but it doesn't solve anything.
The only thing that seems to work is:
Wait Window Timeout nSeconds
...while the user stares at a apparently frozen screen.
Thanks,
Michael
I also want to delete the file after it is printed. However, the file is in use until released by ShellExecute and the Delete command fails, or the delete command executes too quickly and ShellExecute cannot find the file. I tried using the following code:
DO WHILE FILE(cFile) = .T.
DELETE FILE cFile
enddo
Problem: Takes very long. Appears The Delete command and ShellExecute are fighting for processor time.
I tried using a progress bar.=, but it doesn't solve anything.
The only thing that seems to work is:
Wait Window Timeout nSeconds
...while the user stares at a apparently frozen screen.
Thanks,
Michael