Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi OpenPictureDialog und Internet Bilder (https://www.delphipraxis.net/64504-openpicturedialog-und-internet-bilder.html)

braune 13. Mär 2006 08:46

Re: OpenPictureDialog und Internet Bilder
 
Hallo marabu,

ich weiss schon, dass es da bessere Methoden gibt, aber ich möchte halt den Inhalt des Edit-Feldes bevor mir dieser als temporärer Dateiname übermittelt wird, eigentlich brauche ich beide. Ach noch eins, ist "UrlDownloadToFile" ein Bestandteil von Indy?

mfg
Uwe

marabu 13. Mär 2006 14:24

Re: OpenPictureDialog und Internet Bilder
 
UrlDownloadToFile() ist Bestandteil von Windows - du musst nur die Units UrlMon und ActiveX einbinden. Mit dem Funktionsnamen als Suchwort findest du hier im Forum einige Informationen. Und wenn es dir nur um die Bereitsstellung eines Bildes aus dem Internet geht, dann bist du mit allem besser dran, als dem OpenPictureDialog.

Wenn du mit Indy arbeitest - mit Indy9 könnte das stark verkürzt so aussehen:

Delphi-Quellcode:
procedure UrlDownload(const url: String; const fn: TFileName);
var
  fs: TFileStream;
begin
  fs := TFileStream.Create(fn, fmCreate);
  with TidHTTP.Create(nil) do
  begin
    Get(url, fs);
    Free;
  end;
  fs.Free;
end;
marabu

braune 14. Mär 2006 11:34

Re: OpenPictureDialog und Internet Bilder
 
Danke marabu

mfg
Uwe


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:50 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz