使用webbrowser怎么来屏蔽掉主页面外的弹出窗口啊

解决方案 »

  1.   

    把Slient属性设为True就不会弹出了。
      

  2.   

    Specifies whether the Web browser can display dialog boxes.
    Delphi syntax:
    property Silent: WordBool;
    Description
    Set Silent to true to prevent the Web browser control from displaying dialog boxes.
      

  3.   

    Slient属性设为True,运行时会出错的。
      

  4.   

    Slient属性设为True,运行时只是屏蔽比如“脚本错误”这类型的"弹出"窗口,但是如果是新的WebBrower那么你要自己在代码里面写出处理方式了。
      

  5.   

    给你些资料:
    要注意的是,OnNewWindow2有的时候不能完全捕捉到所有的新窗口打开,
    winXP SP2环境下,可以用OnNewWindow3阻断弹出式广告的BHO
    http://www.delphibbs.com/keylife/iblog_show.asp?xid=22746过滤IE的弹出式广告窗口、过滤自编IE内核浏览器的弹出窗口
    http://www.csdn.net/develop/read_article.asp?id=10691抢先式弹出窗口杀手
    http://www.csdn.net/develop/read_article.asp?id=16035
    http://www.csdn.net/develop/read_article.asp?id=15535OnNewWindow3事件
    http://blog.csdn.net/CathyEagle/archive/2004/09/06/95964.aspx