我需要在我的 Windows 窗体应用程序中使用 WebBrowser 控件来使用 最新 版本的 Internet Explorer,或者至少是我的机器上安装的最新版本 - 即 IE 11.>
几周前,在我开始从事这个项目之前,我遇到了一个名为 DevDocs.io 的网站,它在 IE 11 中有效.但是,即使在应用注册表 hack 之后,我也无法在 WebBrowser 控件中查看 DevDocs.io,因为显然我使用的是不受支持"的浏览器.然后继续说我需要使用 Firefox、Chrome 或 IE 10+.我以为我使用的是 IE 10+,因为我已将 DWORD 添加到注册表中.
我遇到过许多网站,由于 WebBrowser 控件仍未在 IE11、10 或 9 中呈现,因此无法正常显示或行为.
我想知道两件事:
- 是否有公开 WebBrowser 控件使用的渲染引擎的方法或类?
- 为什么 DWORD Registry hack 不起作用,我该如何让它起作用?
要清楚,我已经去了注册表,并查了一下:HKEY LOCAL MACHINE >软件 >微软互联网浏览器 >主要 >功能控制 >FEATURE_BROWSER_EMULATION 并添加了一个值为 myApp.exe 和 11000 的 DWORD.
11000 是根据 msdn.microsoft/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation.
解决方案你需要在主(64bit)节点和32bit节点下添加你的注册表项,HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerMainFeatureControl
然后您应该访问 webdbg/ua.aspx 以验证文档模式和 UA 字符串.
I need the WebBrowser Control in my Windows Forms application to render pages using the latest version of Internet Explorer, or atleast the latest version that is installed on my machine - which is IE 11.
A few weeks ago, before I began working on this project I came across a website called DevDocs.io, and in IE 11 it works. However, even after applying the registry hack I cannot view DevDocs.io in the WebBrowser control because apparently I am using an "Unsupported" browser. It then goes on to say that I need to use either Firefox, Chrome or IE 10+. I thought I was using IE 10+ since I had added the DWORD to the registry.
I've come across many websites that just don't display or behave normally due to the fact that the WebBrowser control still isn't rendering in IE11, or 10, or 9...
There are two things I would like to know:
- Is there a method or class that exposes the rendering engine being used by the WebBrowser Control?
- Why isn't the DWORD Registry hack working, and how do I get it to work?
To be clear, I have gone to the Registry, and looked up: HKEY LOCAL MACHINE > SOFTWARE > MICROSOFT > INTERNET EXPLORER > MAIN > FEATURE CONTROL > FEATURE_BROWSER_EMULATION and added a DWORD with values myApp.exe and 11000.
The 11000 is to get it to render using IE11, as per msdn.microsoft/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation.
解决方案You need to add your registry key under both the main (64bit) node and the 32bit node, HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerMainFeatureControl
You should then visit webdbg/ua.aspx to verify the document mode and UA string.
更多推荐
无法使用当前版本的 IE 强制 WebBrowser Control 呈现
发布评论