Thanks for the nice sample. Did you know that the BeforeNavigate2 event does not fire? This is due to a COM interop bug (see kb article: Q311298). You can overcome this by also implementing the DWebBrowserEvents (in addition to the DWebBrowserEvents2) sink on the activex web browser control.
See [1] for an example of a solution to this bug. -- Peter [1] http://www.syncfusion.com/FAQ/WinForms/FAQ_c100c.asp#q842q > > Ted Faison spake: > > > > In the new book: > > > > "Component-based development with Visual C#" > > > > there is a chapter devoted to WebBrowser reuse. After finishing the > book, > > I > > went on the create a couple additional samples to further customize > > WebBrowser. The samples show how to use IDocHostUIHandler and a number > of > > other interfaces to achieve complete control over WebBrowser. The > samples > > can be found at: > > > > http://www.faisoncomputing.com/samples/programming_samples.htm > > > > In the near future I plan to post equivalent examples in VB.NET. > > > > --Ted Faison You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.