Simple URL filter

Add-in Express™ Support Service
That's what is more important than anything else

Simple URL filter
url filter bho 
Hamid Moazed




Posts: 2
Joined: 2009-12-06
I'm trying to implement a simple IE browser BHO, lets say I want to block all websites that start with the letter "y", like www.yahoo.com.

I tried using BeforeNavigate2 event, the propblem is it triggers many many times for a single page, once for the main url, and then many times for the ads, etc., contained in that main document. I can't figure out how to distinguish between the events, I just need to deal with the top level one and ignore the rest. I tried comparing ADXIEBeforeNavigate2EventArgs.PDisp with this.TopLevelControl, it always returns false. I've been stuck for a while, and would really appreciate some help.

Thanks in advance,
Hamid
Posted 09 Jan, 2010 21:09:29 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Hamid.

You need to call the Stop method of the IE object model to prevent the web page from being opened.
Posted 11 Jan, 2010 11:00:41 Top