uses
ActiveX,ComObj;
procedure TForm1.Button1Click(Sender: TObject);
var
PersistStreamInit: IPersistStreamInit;
sd:TStreamAdapter;
ms:TMemoryStream;
HtmlCode:string;
URL: OleVariant;
begin
IdHTTP1.HandleRedirects := true;
HtmlCode := IdHTTP1.Get('http://www.delphibbs.com') ;
Memo1.Text := HtmlCode;
ms:=TMemoryStream.Create;
ms.Write(HtmlCode[1],Length(HtmlCode));
ms.Position := 0;
sd:=TStreamAdapter.Create(ms);
URL := 'about:blank';
WebBrowser1.Navigate2(URL);
WebBrowser1.Document.QueryInterface(IPersistStreamInit, PersistStreamInit);
PersistStreamInit.InitNew;
PersistStreamInit.Load(sd);
end;