unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, idHTTP, StdCtrls, ComCtrls, IdBaseComponent, IdComponent,
IdTCPServer, IdCustomHTTPServer, IdHTTPServer, IdTCPConnection,
IdTCPClient;
type
TForm1 =
class(TForm)
Button1: TButton;
ProgressBar1: TProgressBar;
IdHTTP1: TIdHTTP;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
procedure IdHTTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCountMax: Integer);
procedure IdHTTP1Work(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCount: Integer);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var stream:TFilestream;
begin
stream:=TFilestream.create('
C:\Rrring_2.5.rar',fmcreate);
idhttp1.Host:='
diamonddog.jeak.de';
idhttp1.connect;
idhttp1.Get('
infium/rrring/Rrring_2.5.rar',stream);
idhttp1.disconnect;
end;
procedure TForm1.IdHTTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCountMax: Integer);
begin
progressbar1.min:=0;
progressbar1.max:=aworkcountmax
end;
procedure TForm1.IdHTTP1Work(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCount: Integer);
begin
progressbar1.position:=aworkcount
end;
end.