The blog has moved to a new address. The blog is now located at

Wednesday, July 19, 2006

How do I use the WebBrowser as a HTML editor?

You can access, and write to, the HTML behind a web page being displayed by the WebBrowser using the WebBrowser.DocumentText property.

Technorati : ,

Why does my application with multiple WebBrowser controls use so much memory?

The WebBrowser control is a resource-intensive control. Be sure to call the Dispose method when you are finished using the control to ensure that all resources are released in a timely fashion. You must call the Dispose method on the same thread that attached the events, which should always be the message or user-interface (UI) thread.

Technorati : , , ,

Where can I find information on the native interfaces?

The WebBrowser control is primarily a managed wrapper of the WebBrowser ActiveX object. There are four main unmanaged interfaces that are wrapped in one form or another:

  1. IWebBrowser2 - The core WebBrowser interface.

  2. DWebBrowserEvents2 - The WebBrowser events.

  3. IDocHostUIHandler - Provides advanced functionality such as: custom context menus, disabling accelerators & providing custom objects to the html script. The WebBrowser control QI's it's Site to obtain this interface.

  4. IinternetSecurityManager - Provides custom security for the browser control.

Technorati : , , ,