unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, XPMan, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdHTTP, UrlMon;
type
TForm1 =
class(TForm)
Label1: TLabel;
XPManifest1: TXPManifest;
StatusBar1: TStatusBar;
Button1: TButton;
Memo1: TMemo;
Label2: TLabel;
IdHTTP1: TIdHTTP;
procedure FormCreate(Sender: TObject);
procedure memo_nehmen(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
memo1.Clear;
label2.Caption := '
';
end;
procedure TForm1.memo_nehmen(Sender: TObject);
var
Quelle, Ziel:
String;
begin
label2.Caption := (Sender
as TButton).Caption;
Quelle := '
http://www.google.de/index.html';
Ziel := '
C:\Dokumente und Einstellungen\Computer\Eigene Dateien\Schule\Informatik\Delphi\Hausaufgaben\index.html';
UrlDownloadToFile(
nil, PChar(Quelle), PChar(Ziel), 0,
nil);
end;
end.