Hi Bhavbhuti,
Check out FILE()
>Hi all
>
>I use the ActiveX control in a seperate VFP utility for just this purpose. This ActiveX is of Report Manager and it is supposed to create a PDF file.
>
>As this utility (exe) is being run as a seperate process from my main VFP app so the app can continue while the utility is being executed.
>
>In case the user has asked for a PDF file generation and print, the main VFP app is supposed to wait while the PDF file is being created. I have the following code please let me know if it can be improved upon.
>
>
lnSeconds = SECONDS()
>
> *** loop until the files is freed from RM creation
> DO WHILE .T.
> lnFH = FOPEN(lcTextFile, 12)
>
> IF lnFH > 0
> FCLOSE(lnFH)
>
> EXIT
> ENDIF
>
> IF SECONDS() - lnSeconds > 30
> *** 30 seconds elasped and no file is created
> EXIT
> ENDIF
> ENDDO