亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

請問C# winform webbrowser如何指定內核為IE11?

請問C# winform webbrowser如何指定內核為IE11?

C#
牛魔王的故事 2019-07-14 08:08:42
輸出 this.webbrowser.Version 顯示版本是IE11的,但實際版本不是??! 網上打的修改注冊表HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION 也不行???
查看完整描述

3 回答

?
Cats萌萌

TA貢獻1805條經驗 獲得超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);//調試運行需要加上,否則不起作用
}

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或者其版本限制。


查看完整回答
反對 回復 2019-07-15
?
隔江千里

TA貢獻1906條經驗 獲得超10個贊

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.


查看完整回答
反對 回復 2019-07-15
  • 3 回答
  • 0 關注
  • 1600 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號