C# winform webbrowser如何指定内核为IE11?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了C# winform webbrowser如何指定内核为IE11?相关的知识,希望对你有一定的参考价值。
输出 this.webbrowser.Version 显示版本是IE11的,但实际版本不是啊! 网上打的修改注册表HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION 也不行???
解决方法如下
1、假设你应用程序的名字为MyApplication.exe
2、运行Regedit,打开注册表,找到
HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Internet Explorer\\MAIN\\FeatureControl\\FEATURE_BROWSER_EMULATION
3、添加以下项
IE各版本的值如下:
11001 (0x2EDF) Internet Explorer 11. Webpages are displayed in IE11 Standards mode, regardless of the !DOCTYPE directive
11000 (0x2AF8) :Internet Explorer 11. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode
10000 (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.
拓展资料
内核是操作系统最基本的部分。它是为众多应用程序提供对计算机硬件的安全访问的一部分软件,这种访问是有限的,并且内核决定一个程序在什么时候对某部分硬件操作多长时间。内核的分类可分为单内核和双内核以及微内核。严格地说,内核并不是计算机系统中必要的组成部分。
参考资料:内核—百度百科
参考技术A1)假设你应用程序的名字为MyApplication.exe
2)运行Regedit,打开注册表,找到
HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Internet
Explorer\\MAIN\\FeatureControl\\FEATURE_BROWSER_EMULATION
3)添加以下项
MyApplication.exe 0x2af9
MyApplication.vshost.exe 0x2af9
xxx.vshost.exe是为了Visutal Studio调试状态使用。
拓展资料
C#是微软公司发布的一种面向对象的、运行于.NET Framework之上的高级程序设计语言。并定于在微软职业开发者论坛(PDC)上登台亮相。C#是微软公司研究员Anders Hejlsberg的最新成果。C#看起来与Java有着惊人的相似;它包括了诸如单一继承、接口、与Java几乎同样的语法和编译成中间代码再运行的过程。但是C#与Java有着明显的不同,它借鉴了Delphi的一个特点,与COM(组件对象模型)是直接集成的,而且它是微软公司 .NET windows网络框架的主角。
参考技术B代码如下:
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或者其版本限制。
参考技术C1)假设你应用程序的名字为MyApplication.exe
2)运行Regedit,打开注册表,找到
HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Internet Explorer\\MAIN\\FeatureControl\\FEATURE_BROWSER_EMULATION
3)添加以下项
IE各版本的值如下:
11001 (0x2EDF) Internet Explorer 11. Webpages are displayed in IE11 Standards mode, regardless of the !DOCTYPE directive
11000 (0x2AF8) :Internet Explorer 11. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode
10000 (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.
搞了一晚才发现,即使修改了注册表调试的时候也是用旧内核的。直接打开就行了,谢谢!!
本回答被提问者和网友采纳C# winform webbrowser如何指定内核为IE11? 输出 this.webbrowser.Version 显示版本是IE11的,但实际版本不是啊! 网上打的修改注册表HKEY_LOCA
1)假设你应用程序的名字为MyApplication.exe
2)运行Regedit,打开注册表,找到
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
3)添加以下项
IE各版本的值如下:
-
11001 (0x2EDF) Internet Explorer 11. Webpages are displayed in IE11 Standards mode, regardless of the !DOCTYPE directive
-
11000 (0x2AF8) :Internet Explorer 11. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode
-
10000 (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.
以上是关于C# winform webbrowser如何指定内核为IE11?的主要内容,如果未能解决你的问题,请参考以下文章
C# winform webbrowser如何指定内核为IE11?
C# winform webbrowser如何指定内核为IE11? 输出 this.webbrowser.Version 显示版本是IE11的,但实际版本不是啊! 网上打的修改注册表HKEY_LOCA