打开网页会触发什么事件(20)

  • 主题发起人 主题发起人 zqssoft
  • 开始时间 开始时间
Z

zqssoft

Unregistered / Unconfirmed
GUEST, unregistred user!
当用浏览器(如IE,Firefox等)打开一个新的网页,新的链接时,在系统中会触发什么事件和消息,如何用程序捕获这个事件和消息,从而得到新打开网而的网址呢?
 
那位大哥给解答一下啊,3Q。
 
使用BHO:事件说明:DWebBrowserEvents2 = dispinterface ['{34A715A0-6587-11D0-924A-0020AFC7AC4D}'] procedure StatusTextChange(const Text: WideString); dispid 102; procedure ProgressChange(Progress: Integer; ProgressMax: Integer); dispid 108; procedure CommandStateChange(Command: Integer; Enable: WordBool); dispid 105; procedure DownloadBegin; dispid 106; procedure DownloadComplete; dispid 104; procedure TitleChange(const Text: WideString); dispid 113; procedure PropertyChange(const szProperty: WideString); dispid 112; procedure BeforeNavigate2(const pDisp: IDispatch; var URL: OleVariant; var Flags: OleVariant; var TargetFrameName: OleVariant; var PostData: OleVariant; var Headers: OleVariant; var Cancel: WordBool); dispid 250; procedure NewWindow2(var ppDisp: IDispatch; var Cancel: WordBool); dispid 251; procedure NavigateComplete2(const pDisp: IDispatch; var URL: OleVariant); dispid 252; procedure DocumentComplete(const pDisp: IDispatch; var URL: OleVariant); dispid 259; procedure OnQuit; dispid 253; procedure OnVisible(Visible: WordBool); dispid 254; procedure OnToolBar(ToolBar: WordBool); dispid 255; procedure OnMenuBar(MenuBar: WordBool); dispid 256; procedure OnStatusBar(StatusBar: WordBool); dispid 257; procedure OnFullScreen(FullScreen: WordBool); dispid 258; procedure OnTheaterMode(TheaterMode: WordBool); dispid 260; end;看你的需求只需要在BeforeNavigate2事件里写代码就行了,说多了估计你也不懂,如果做不来外包给我做好了
 
阻断弹出式广告的BHO http://www.delphibbs.com/keylife/iblog_show.asp?xid=23404用Delphi开发过滤特定网址的BHO插件http://hi.baidu.com/asm386/blog/item/33afe3259abdf8348644f9d7.html如何编写阻断弹出式广告BHO的安全工具http://hi.baidu.com/%D1%A9%C0%C72002/blog/item/7e1b7f5cd961cd44fbf2c0f7.html
 
接受答案了.
 
后退
顶部