nit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, SHDocVw, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdHTTP, ExtCtrls;
type
TForm1 = class(TForm)
IdHTTP1: TIdHTTP;
Image1: TImage;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
Buffer: TMemoryStream;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Buffer:=TmemoryStream.Create;
IdHttp1.Port:=80;
IdHttp1.Get('http://www.delphibbs.com/delphibbs/dfwlogo.gif',Buffer);
ShowMessage(inttostr(Buffer.Size));
Buffer.SaveToFile('c:/a.gif');
//Image1.Picture.Graphic.LoadFromStream(Buffer);
end;
end.