获取 WebBrowser 控件的后退/前进历史记录

发布于 2024-07-05 18:50:56 字数 77 浏览 6 评论 0原文

在 C# WinForms 中,获取 System.Windows.Forms.WebBrowser 的后向/前向历史堆栈的正确方法是什么?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

洋洋洒洒 2024-07-12 18:50:56

看起来不可能。

我的建议是捕捉导航事件并维护您自己的列表。 一个可能的问题是,当用户在浏览器中单击返回时,您不知道要展开堆栈。

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.

尘世孤行 2024-07-12 18:50:56

请查看 http://www.bsalsa.com/downloads.html。 这是一系列 Delphi 组件(免费源代码,您可以在这里查看示例:http://staruml.cvs.sourceforge.net/staruml/staruml/staruml/components/ Plastic-components/src/embeddedwb。 pas?revision=1.1&view=markup - 这是 starUML 项目代码),除其他外,他们还有一种使用 IE MSHTML 界面获取历史记录、收藏夹等的方法。 它是用 Object Pascal 编写的,但弄清楚发生了什么应该不会太难。 如果您下载“嵌入式 Web 浏览器组件包”,请查看 EmbeddedWB_D2005\Source 中的内容 - 那里有各种各样的好东西。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文