3 回答

TA貢獻1805條經(jīng)驗 獲得超9個贊
代碼如下:
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);//調(diào)試運行需要加上,否則不起作用
}
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);//調(diào)試運行需要加上,否則不起作用
}
拓展資料
IE內(nèi)核是無法單獨加入的。不過理論上你也可以試試,模擬IEtest的方式。360瀏覽器也是直接調(diào)用IE內(nèi)核,并不是單獨的,而是系統(tǒng)的,無法指定內(nèi)核版本。但是你可以嵌入webkit內(nèi)核,這樣不必基于IE或者其版本限制。

TA貢獻1906條經(jīng)驗 獲得超10個贊
1)假設(shè)你應(yīng)用程序的名字為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.
- 3 回答
- 0 關(guān)注
- 1581 瀏覽
添加回答
舉報