Question

In C# WinForms, what's the proper way to get the backward/forward history stacks for the System.Windows.Forms.WebBrowser?

Was it helpful?

Solution

Check out http://www.bsalsa.com/downloads.html. This is a series of Delphi components (free source code, you can see an example of this here: http://staruml.cvs.sourceforge.net/staruml/staruml/staruml/components/plastic-components/src/embeddedwb.pas?revision=1.1&view=markup - it's the starUML projects code) and they have, among other things, a way to get at the history, favorites, etc using the IE MSHTML interfaces. It's written in Object Pascal but it shouldn't be too hard to figure out what's going on. If you download the "Embedded Web Browser Components Package" take a look at the stuff in EmbeddedWB_D2005\Source - there's all sorts of goodies there.

OTHER TIPS

It doesn't look like it's possible.

My suggestion would be to catch the Navigated event and maintain your own list. A possible problem with that is when the user clicks back in the browser, you don't know to unwind the stack.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top