关于BHO(Browes Helper Object) 请问哪有关于Browes Helper Object的资料,或者请问如何用Delphi定制一个插件,使网页顶端增加一个长条形的图片,还有在网页跳转的过程中先转到别的网页,等找到要找的网页之后又跳到要找的页面,以及如何更改IE的主页! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://cnprogram.myrice.com/article/delphi/delphi526.html一个BHO的简单例子 去这里看看http://www.euromind.com/iedelphi/ie5tools/bho.htm,我也没有深入去了解,曾做了一个秋风网页广告拦截器,1.2版是用BHO插件实现的,可去网上搜一下;http://www.xiya.com.cn/xiangqin/awind/codes/adkiller.rar是其源码,下载下去看一下对你有没有帮助 delphi & IE: 这个网站有. 秋风我已下载了,但不能实现我需要的功能啊!能不能给我点资料啊!Delpi&ie这个网站的网址是多少?我没找到! 就是http://www.euromind.com/iedelphi/ie5tools/bho.htm啊,你进去看看 http://msdn.microsoft.com/ie/iedev/default.aspx?pull=/library/en-us/dnwebgen/html/bho.asphttp://www.01cn.net/cgi-bin/topic_print.cgi?id=1069 你们所说的东东我都去看了!啃了两天的E文,BHO是弄懂了!但是没有找到能在网页顶端增加一个长条形的图片,以及在网页跳转的过程中先显示一下别的网页,等找到要找的网页之后又跳到要找的页面这些方面的资料 BHO的东东找了不少,但是要使网页顶端增加一个长条形的图片,还有在网页跳转的过程中先转到别的网页,等找到要找的网页之后又跳到要找的页面,牵涉的东西网上没多少资料啊!关于在网页上增加内容,我找到了些,但我写下如下代码后,打开IE,IE就在不停地闪,不知道是哪有问题。procedure DoNavigateComplete2(const pDisp: IDispatch; var URL: OleVariant);const BufSize = $10000;var Size: Int64; re_Stream: IStream; re_hHTMLText: HGLOBAL; re_psi: IPersistStreamInit; wr_Stream: IStream; wr_hHTMLText: HGLOBAL; wr_psi: IPersistStreamInit; html:string; str:string; str_col:string; i:integer;begin if not Assigned((pDisp as WebBrowser).Document) then Exit; OleCheck((pDisp as WebBrowser).Document.QueryInterface(IPersistStreamInit, re_psi)); try re_hHTMLText := GlobalAlloc(GPTR, BufSize); if 0 = re_hHTMLText then RaiseLastWin32Error; OleCheck(CreateStreamOnHGlobal(re_hHTMLText,True, re_Stream)); try OleCheck(re_psi.Save(re_Stream, False)); Size := StrLen(PChar(re_hHTMLText)); SetLength(html, Size); CopyMemory(PChar(Html), Pointer(re_hHTMLText),Size); finally re_Stream := nil; end; finally re_psi := nil; end; i:=pos('<body',Html); str:=copy(html,0,i); Html:=copy(Html,i+1,length(Html)-i); i:=pos('>',Html); str:=str+copy(html,0,i); Html:=copy(Html,i+1,length(Html)-i); str:=str+'<a href="http:\\www.csdn.net\"><img src="BBSData/re10MYY/12652.gif" width="463" height="60" border="0"></a>'+Html; if not Assigned((pDisp as WebBrowser).Document) then Exit; wr_hHTMLText := GlobalAlloc(GPTR, Length(Html) + 1); if 0 = wr_hHTMLText then RaiseLastWin32Error; CopyMemory(Pointer(wr_hHTMLText),PChar(Html), Length(Html)); OleCheck(CreateStreamOnHGlobal(wr_hHTMLText, True, wr_Stream)); try OleCheck((pDisp as WebBrowser).Document. QueryInterface(IPersistStreamInit, wr_psi)); try OleCheck(wr_psi.InitNew); OleCheck(wr_psi.Load(wr_Stream)); finally wr_psi := nil; end; finally wr_Stream := nil; end;end;关于在网页跳转的过程中先转到别的网页,等找到要找的网页之后又跳到要找的页面,应该是在浏览器打开网页时把另一个显示自定义网页的窗口显示出来覆盖IE的那个浏览器窗口,在OnDocumentComplete事件中再把你自己的网页窗口销毁。但我不知道应该怎么样用自定义的网页窗口覆盖IE浏览窗口啊!还请各位大虾帮帮忙! 有难度的捕捉异常问题 一个关于画点的问题,急,在线等 有关进度条的问题! 能很快实现这功能吗?点击 E_mail:[email protected]调用outlook发邮件 讨论:各位delphi战友请看!班主请看! "<>“在delphi中是恒等还是不等? 超难度的SQL语句, 要求不用存储过程. 就是sql 语句. help 在线 怎么把带有'的字符添加到数据库中 请问DELPHI中把STRING转成CHAR[]应该怎么弄? 一个关于数据添加的问题? 誰有Proxies的單元文件可以email一份給我啊
一个BHO的简单例子
http://www.01cn.net/cgi-bin/topic_print.cgi?id=1069
procedure DoNavigateComplete2(const pDisp: IDispatch; var URL: OleVariant);
const
BufSize = $10000;
var
Size: Int64;
re_Stream: IStream;
re_hHTMLText: HGLOBAL;
re_psi: IPersistStreamInit;
wr_Stream: IStream;
wr_hHTMLText: HGLOBAL;
wr_psi: IPersistStreamInit;
html:string;
str:string;
str_col:string;
i:integer;
begin
if not Assigned((pDisp as WebBrowser).Document) then Exit;
OleCheck((pDisp as WebBrowser).Document.QueryInterface(IPersistStreamInit, re_psi));
try
re_hHTMLText := GlobalAlloc(GPTR, BufSize);
if 0 = re_hHTMLText then RaiseLastWin32Error;
OleCheck(CreateStreamOnHGlobal(re_hHTMLText,True, re_Stream));
try
OleCheck(re_psi.Save(re_Stream, False));
Size := StrLen(PChar(re_hHTMLText));
SetLength(html, Size);
CopyMemory(PChar(Html), Pointer(re_hHTMLText),Size);
finally
re_Stream := nil;
end;
finally
re_psi := nil;
end;
i:=pos('<body',Html);
str:=copy(html,0,i);
Html:=copy(Html,i+1,length(Html)-i);
i:=pos('>',Html);
str:=str+copy(html,0,i);
Html:=copy(Html,i+1,length(Html)-i);
str:=str+'<a href="http:\\www.csdn.net\"><img src="BBSData/re10MYY/12652.gif" width="463" height="60" border="0"></a>'+Html; if not Assigned((pDisp as WebBrowser).Document) then Exit;
wr_hHTMLText := GlobalAlloc(GPTR, Length(Html) + 1);
if 0 = wr_hHTMLText then RaiseLastWin32Error;
CopyMemory(Pointer(wr_hHTMLText),PChar(Html), Length(Html));
OleCheck(CreateStreamOnHGlobal(wr_hHTMLText, True, wr_Stream));
try
OleCheck((pDisp as WebBrowser).Document.
QueryInterface(IPersistStreamInit, wr_psi));
try
OleCheck(wr_psi.InitNew);
OleCheck(wr_psi.Load(wr_Stream));
finally
wr_psi := nil;
end;
finally
wr_Stream := nil;
end;
end;
关于在网页跳转的过程中先转到别的网页,等找到要找的网页之后又跳到要找的页面,应该是在浏览器打开网页时把另一个显示自定义网页的窗口显示出来覆盖IE的那个浏览器窗口,在OnDocumentComplete事件中再把你自己的网页窗口销毁。但我不知道应该怎么样用自定义的网页窗口覆盖IE浏览窗口啊!还请各位大虾帮帮忙!