是否有可能为.net WebBrowser控件使用IE9? [英] Is it possible for the .NET WebBrowser control to use IE9?

查看:429
本文介绍了是否有可能为.net WebBrowser控件使用IE9?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我意识到这是一个早期版本和不稳定。我做梦也不会想到的任何其他项目换出的默认网页浏览器控制IE9的,但在这种情况下,我特别需要IE9的比较与其他版本。

我想有.NET WebBrowser控件使用IE9,而不是IE浏览器的机器上的默认版本。我有完全的控制机器,所以它是没有问题的,谬以千里的系统文件或其他任何可能是必要的。

I'd like to have the .NET WebBrowser control use IE9 instead of the default version of IE on the machine. I have full control of the machine so it's no problem to hack away at system files or whatever else may be necessary.

通常情况下,这可以通过安装该更新,IE浏览器来实现,但在IE9的情况下,它会安装一个单独的应用程序,使IE浏览器的最新版本不变。这意味着WebBrowser控件继续使用当前版本(这是有道理的,是一个聪明的举动,MS,因为IE9仍处于开发阶段)。但在我的(边缘)的情况下,我需要WebBrowser控件使用IE9。

Normally, this could be achieved by installing the update to IE, but in IE9's case, it installs a separate application, leaving the current version of IE untouched. This means the WebBrowser control continues to use the current version (which makes sense and was a smart move by MS, since IE9 is still under development). But in my (edge) case I need the WebBrowser control to use IE9.

是否有可能嵌入IE9在.NET窗体应用程序?

Is it possible to embed IE9 in a .NET forms application?

修改

通过<一个href="http://stackoverflow.com/questions/3346007/is-it-possible-for-the-net-webbrowser-control-to-use-ie9/3346368#3346368">Hans顺便的帮助我越来越远一些。一些非常有趣的是发生在IE9的PROG文件的目录。有一个叫,即preview.exe.local目录当中,取出时,使IE9 preVIEW应用程序中使用IE8(与Acid3测试签)。

With Hans Passant's help I'm getting a bit further. Something very interesting is happening within IE9's prog files directory. There's a directory called "iepreview.exe.local" which, when removed, makes the IE9 Preview app use IE8 (checked it with the acid3 test).

不太是我想要的,但我不知道这是否是某种形式的重定向,我可以利用我的需求的。

Not quite what I want, but I'm wondering if this is some kind of redirection that I could exploit for my needs.

编辑2

我已经试过应用。本地劈到iexplore.exe的两个副本,我和我的.NET应用程序,我已经发现了一些有趣的东西 - 这两个应用程序开始使用的 IE7 而不是IE8(我的版本IE浏览器),或者IE9的。

I've tried applying the .local hack to both my copy of iexplore.exe and my .NET app and I've noticed something else interesting - both apps began using IE7 instead of IE8 (my version of IE) or IE9.

难道这是IEXPLORE尝试使用IE9,然后再下降到IE7?似乎有些奇怪那就甚至有IE7可用,但就是这样开始使用的用户代理字符串。

Could this be iexplore trying to use IE9 and then falling back onto IE7? Seems strange it would even have IE7 available, but that's the useragent string it starts using.

推荐答案

IE9可以安装并排侧的唯一方法是,当它使用的接口和组件类新的GUID。这意味着你不能使用web浏览器,它具有GUID的硬codeD。

The only way IE9 could install side-by-side is when it uses new GUIDs for the interfaces and coclasses. Which means that you cannot use WebBrowser, it has the GUIDs hard-coded.

还有另外一个选择,使用AxHost包装。用鼠标右键单击工具箱中,选择项目,选择COM组件选项卡,然后在列表中找到IE9。不知道它会被调用,旧名是Microsoft Web浏览器,用C服务:\ WINDOWS \ SYSTEM32 \ ieframe.dll

There's one other option, using the AxHost wrapper. Right-click the toolbox, Choose Items, select the COM Components tab and locate IE9 in the list. No idea what it might be called, the old name was "Microsoft Web Browser", serviced by c:\windows\system32\ieframe.dll

您将不得不作出离不开友好web浏览器和的HTMLDocument包装类。

You'll have to make do without the friendly WebBrowser and HtmlDocument wrapper classes.

这篇关于是否有可能为.net WebBrowser控件使用IE9?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆