![]() |
JPG mit Indy per HTTP einbinden ?
Moin Moin,
Ist es möglich ein JPG-Bild mit Indy 10 per HTTP in Delphi 5 Standard einzubinden ? Falls ja würde mich natürlich interessieren wie ;) Also ich habe ein TImage und würde dort gerne ein JPG ala ![]() |
Re: JPG mit Indy per HTTP einbinden ?
habemir mal was aus teilen die ich so gefunden habe gebastelt, aber ob das das wahre ist ?
Delphi-Quellcode:
funktionieren tut es jedenfalls
function DownloadFile(SourceFile, DestFile: string): Boolean;
begin try Result := UrlDownloadToFile(nil, PChar(SourceFile), PChar(DestFile), 0, nil) = 0; except Result := False; end; end; procedure TForm1.Button2Click(Sender: TObject); var SourceFile, DestFile : string; begin SourceFile := 'http://www.domain.de/bild.jpg'; DestFile := ExtractFilePath(ParamStr(0)) + 'temp.jpg'; if DownloadFile(SourceFile, DestFile) then begin ShellExecute(Application.Handle, PChar('copy'), PChar(DestFile), PChar(''), nil, SW_NORMAL); Image1.Picture.LoadFromFile(PChar(ExtractFilePath(ParamStr(0))) + 'temp.jpg'); DeleteUrlCacheEntry(PChar(SourceFile)); end else ShowMessage('Verbindungsfehler') end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:50 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz