![]() |
Download
Hallo!
Ich würde gerne eine Downloadfunktion in mein Programm integrieren. Der Server ist im Internet also kein anderer PC sondern eine freizugängliche http Seite. Jedenfalls will ich, dass in einer TStatusBar der Downloadstatus angezeigt wird. Wie kann ich... 1. ...sowas überhaupt realisieren? 2. ...die StatusBar für den Downloadstatus benutzen? Danke schon mal... |
Re: Download
Delphi-Quellcode:
Quelle: Delphi-Netzwerk.de Code Library
//zweite Möglichkeit, Download in eine Datei (mit Fortschritsanzeige)
procedure TForm1.Button1Click(Sender: TObject); var Datei: TFIleStream; begin Datei:=TFileStream.create('C:\datei.exe',fmCreate); IdHttp1.Get('http://www.domain.de/datei.exe',Datei); Datei.free; end; procedure TForm1.IdHTTP1Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer); begin Label1.Caption:=idHttp1.url.Document+' ('+inttostr(AWorkCount div 1024)+' kB von '+inttostr(IdHTTP1.Response.ContentStream.Size div 1024)+' kB)'; Progressbar1.Position:=AWorkCount*100 div IdHTTP1.Response.ContentStream.Size; application.ProcessMessages; end; Gruß Alex |
Re: Download
auch in der dp code library ist ein code dazu...
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:12 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