light_bulb
asked on
Determine if a file is open
How can I easily determine if a file is already open before I try to open it programatically.
Specifically, my program involves displaying pdf files in Acrobat Reader. If the user already has one the pdf file open, how can detect that?
Thanks!
Specifically, my program involves displaying pdf files in Acrobat Reader. If the user already has one the pdf file open, how can detect that?
Thanks!
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
if you can -> the file is not in use
if you not can -> the file is use
guess this does the suggestion of Johnjces already,
it could be done with a TFileStream aslo
meikl ;-)