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


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.

Surely it's possible using the native mshtml.
Judah Himango
Maybe. What do you mean?
I mean, there's gotta be a way to get it using the underlying IE ActiveX control.
Judah Himango
+3  A: 

Hey Judah! Check out This is a series of Delphi components (free source code, you can see an example of this here: - 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.

Jim Crafton