When we open a folder containing images and PDF files with the following command: If we delete the image and run the above command again, ImageEnView1 does not bring back the deleted image and there is no problem. But if we open the PDF file in ImageEnView1 and then delete the PDF file and run the following command again, even though the PDF file does not exist, unfortunately ImageEnView1 still opens the opened PDF file. We have to close the entire program and reopen it for it to work properly.
if not DirectoryExists(Path_of_Documents1+'\'+DM1.FDMain_Query.FieldByName(Field_name1).AsString ) then CreateDir(Path_of_Documents1+'\'+DM1.FDMain_Query.FieldByName(Field_name1).AsString ); ImageEnMView1.FillFromDirectory(Path_of_Documents1+'\'+DM1.FDMain_Query.FieldByName(Field_name1).AsString+'\' );
In ImageEnView1 is ok. ImageEnView1.PdfViewer.Enabled := False;
But for ImageEnMView1 show The error "undeclared identifier PdfViewer". I use iepdf. ImageEnMView1.PdfViewer.Enabled := False;
After the above command my previous problem with ImageEnView1 is solved. But when I add another pdf file and click on that pdf in ImageEnMView1 I want the pdf file to show in ImageEnView1 it gives the following error in my attachment file: