unit laden;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP, XPMan, IdAntiFreezeBase, IdAntiFreeze;
type
TForm1 =
class(TForm)
IdHTTP1: TIdHTTP;
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Label3: TLabel;
Status: TLabel;
XPManifest1: TXPManifest;
IdAntiFreeze1: TIdAntiFreeze;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
lStream: TFileStream;
begin
Status.Caption := '
Herunterladen...';
IdHTTP1.Head(Edit1.Text);
lStream:=TFileStream.Create(Edit2.Text, fmCreate
or fmShareDenyNone);
try
idHTTP1.Get(Edit1.Text, lStream);
finally
if Assigned(lStream)
then lStream.Free;
end;
Status.Caption := '
Fertig!!!';
end;
end.