>Then I guess it will work. I appreciate your help. I wrote the code as follows:
>
>
>* Print the pdf.
>llprintpdf = thisform.printpdf(lcxfdf)
>IF !llprintpdf
> * Cannot print the file.
> SELECT(lnalias)
> RETURN .f.
>ENDIF
>
>* Wait 12 seconds.
>WAIT 'Printing the 8655 form...' window timeout 12
>WAIT CLEAR
>
>lnfilehandle = -1
>DO while lnfilehandle == -1
> * Are we finished printing?
> * If we're still printing, we won't be able to open the file r/w.
> * If we're done printing, we can open the file r/w and we will get a reference back to it,
> * the file handle.
>
> * Try to open the file open read/write.
> lnfilehandle = FOPEN(lcxfdf,12)
>ENDDO
>
>* Close the file and go.
>=FCLOSE(lnfilehandle)
>
>
>
>>>The application prints a file.
>>>
>>> If I try to open a file read/write and its being printed, will I get a handle back
>>>lnfilehandle = FOPEN(lcxfdf,12) or will I get -1 back?
>>>
>>
>>I think you should get -1 while it's printed.
I'm thinking it will work but may be we need to put some extra condition to not fall into endless loop.
If it's not broken, fix it until it is.
My Blog