Failure of LoadFromURL can be detected by looking at the Aborting value.
ImageEnMView LoadFromURL Error detection:
procedure TForm1.LoadFromURL1Click(Sender: TObject);
var
iURL: string;
begin
iCount := ImageEnMView1.ImageCount;
iURL := 'http://www.xequte.com/imageen/graphics/page/logo.gf';
// the correct url is http://www.xequte.com/imageen/graphics/page/logo.gif
ImageEnMView1.MIO.LoadFromURL(iURL);
if ImageEnMView1.MIO.Aborting then
MessageBox(0, PWideChar('URL image ' + iURL + 'could not be found'), 'Warning', MB_ICONWARNING or MB_OK);
end;
ImageEnView LoadFromURL Error detection:
procedure TForm1.LoadFromURL1Click(Sender: TObject);
var
iURL: string;
begin
iURL := 'http://www.xequte.com/imageen/graphics/page/logo.gf';
// the correct url is http://www.xequte.com/imageen/graphics/page/logo.gif
ImageEnView1.IO.LoadFromURL(iURL);
if ImageEnView1.IO.Aborting then
MessageBox(0, PWideChar('URL image ' + iURL + 'could not be found.'), 'Warning', MB_ICONWARNING or MB_OK)
else
ImageEnView1.Update;
end;
William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html