测试一下下面的代码,现写的,必需在D5上面运行,我现在没有D5,你自己测试一下:
var doc:IPersistStreamInit;
stream:tstream;
begin
with webbrowser1 do
begin
if not Assigned(document) then
begin
Go('about:blank');
while readystate <&gt
READYSTATE_COMPLETE do application.ProcessMessages;
end;
//将buffer内容保存到stream里面
//...........
//然后
Stream.seek(0, 0);
(Document as IPersistStreamInit).Load(TStreamadapter.Create(Stream));
end;
end;