打开 IE 并读取 IE 7 或更高版本的页面 c#

发布于 2024-09-30 14:30:45 字数 250 浏览 0 评论 0原文

我需要打开给定 URL 的浏览器(Internet Explorer 7 或更高版本),然后在加载完成后读取内容。让浏览器保持打开状态,供用户随后正常使用。

然后,如果需要,我需要稍后用新的 URL 替换该页面(如果仍然打开)并阅读该页面...

因为在阅读该页面后我需要将它们保留在 IE 中,所以我认为我无法使用浏览器控件,那么我该怎么做呢?

这是一个使用 .Net4 的 Windows 经典表单应用程序。

非常感谢。

I need to open a browser (Internet Explorer 7 or above) for a given URL and then read the contents once it has finished loading. leaving the browser open for the user to use as normal afterwards.

Then I need to replace the page (if still open) with a new URL later if needed and read that page...

As I'm needing to leave them in IE after I have read the page I assume I can't use the browser control, so how would I do this?

This is a windows classic forms app using .Net4.

many thanks.

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

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

发布评论

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

评论(1

随波逐流 2024-10-07 14:30:45

这是可以做到的。查看 http://www.codeproject.com/KB/shell/AutomateShellWindow.aspx

一旦您有权访问 IWebBrowser2,您就可以执行您需要的一切操作,包括导航、阅读内容等。

It can be done. Look http://www.codeproject.com/KB/shell/AutomateShellWindow.aspx

Once you have access to IWebBrowser2 you can do everything you need, including navigate, read content etc.

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