你是要将网页从流中读到webbrowse吗?
解决方案 »
- 一个dll加载的问题!
- 大家好,哪位大哥用的是reportMachine26这种报表
- 怎么样才能把数据库中的两个字段一起写进dbcombobox里去?
- StringGrid的问题。
- HINSTANCE,Hinstance,THandle有什么区别?不明白
- 利用 delphi6 带的installshield,无法安装注册ocx控件,手工注册也无法成功?
- 类型转换
- 如何在richedit中让text一行一行的向上滚动
- 关于李维书的问题。简直是白送分
- 怪!怪!怪!在form.onclose时为何会执行到主窗口mainform的onactive中呢?
- 谁知道如何获的form上的控件总数
- 靠,一群笨蛋,那个能解决我的问题?TMainMenu有办法放到TCoolBar里面去么?非得用coolbar+toolbar+flatbutton去做可以dock的菜单么?
----------------------------------------------------------function SaveToStream(AStream: TStream): HRESULT;
var
IpStream: IPersistStreamInit;
begin
with browser1 do
begin
while ReadyState <> READYSTATE_COMPLETE do
Forms.Application.ProcessMessages;
if Assigned(Document) then
begin
IpStream := Document as IPersistStreamInit;
Result := IpStream.save(TStreamAdapter.Create(AStream), TRUE);
end else Result := S_FALSE;
end;
end;function Loadfromstream(AStream:TStream):hresult;
begin
with browser1 do
begin
if not Assigned(Document) then
begin
navigate2('about:blank',0,0,0,0);
while readystate <> READYSTATE_COMPLETE do Forms.Application.ProcessMessages;
end;
AStream.seek(0, 0);
Result := (Document as IPersistStreamInit).Load(TStreamadapter.Create(AStream));
end;
end;