Your exe does not open the image, but when I compile your project here, the image is loaded correctly. I have no idea why you are having difficulty. Try this:
procedure TForm1.btn1Click(Sender: TObject);
begin
if (OpenImageEnDialog1.Execute) then
begin
if FileExists(OpenImageEnDialog1.FileName) then
begin
ImageEnView1.IO.LoadFromFile(OpenImageEnDialog1.FileName);
ImageEnView1.Update; { This ususally is not required, but in your case it might}
if ImageEnView1.IO.Aborting then
begin
MessageBox(0,
'There was an error opening the image. The image can not be opened.',
'Error', MB_ICONWARNING or MB_OK);
Exit;
end;
end
else
MessageBox(0, 'The image can not be opened. The file does not exist.',
'Error', MB_ICONWARNING or MB_OK);
end;
end;
Do you get an error message when you compile and run this?
Do any of the demo's do the same thing?
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development