Search code examples
c#winformsbrowserwebbrowser-controladblock

How to integrate AdBlock Plus in a C# WebBrowser Control?


Is there is a way to integrate the AdBlock Plus (or any similar addon that works on IE) with a C# WebBrowser Control? Here is my case, I have a form, when opened redirects to a specified website, which doesn't belong to me. And I want to remove all the ads from this website for the user of my application.


Solution

  • You'll need to load the Browser Helper Object representing the addon into the WebBrowser control. This thread describes the process, although it fits C++ better than C#.

    As an aside: I can only imagine this is a bad idea, AdBlock Plus probably assumes it's always running inside of IE. If you manage to load it, it will be running inside of your process instead.