请问C# winform webbrowser如何指定内核为IE11?

输出 this.webbrowser.Version 显示版本是IE11的,但实际版本不是啊! 网上打的修改注册表HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION 也不行???

牛魔王的故事
浏览 1532回答 3
3回答

Cats萌萌

代码如下:RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", true);if (key != null){key.SetValue("XXX.exe", 11001, RegistryValueKind.DWord);key.SetValue("XXX.vshost.exe", 11001, RegistryValueKind.DWord);//调试运行需要加上,否则不起作用}key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", true);if (key != null){key.SetValue("XXX.exe", 11001, RegistryValueKind.DWord);key.SetValue("XXX.vshost.exe", 11001, RegistryValueKind.DWord);//调试运行需要加上,否则不起作用}拓展资料IE内核是无法单独加入的。不过理论上你也可以试试,模拟IEtest的方式。360浏览器也是直接调用IE内核,并不是单独的,而是系统的,无法指定内核版本。但是你可以嵌入webkit内核,这样不必基于IE或者其版本限制。

隔江千里

1)假设你应用程序的名字为MyApplication.exe2)运行Regedit,打开注册表,找到HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION3)添加以下项IE各版本的值如下:11001 (0x2EDF) Internet Explorer 11. Webpages are displayed in IE11 Standards mode, regardless of the !DOCTYPE directive11000 (0x2AF8) :Internet Explorer 11. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode10000 (0x2710) :Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode.10001 (0x2AF7) :Internet Explorer 10. Webpages are displayed in IE10 Standards mode, regardless of the !DOCTYPE directive.9999 (0x270F) :Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.9000 (0x2328) :Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode.8888 (0x22B8) :Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.8000 (0x1F40) :Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode.7000 (0x1B58) :Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode.
打开App,查看更多内容
随时随地看视频慕课网APP