五月综合缴情婷婷六月,色94色欧美sute亚洲线路二,日韩制服国产精品一区,色噜噜一区二区三区,香港三级午夜理伦三级三

您現(xiàn)在的位置: 365建站網(wǎng) > 365文章 > 修改WebBrowser控件默認(rèn)使用IE9,IE10的方法

修改WebBrowser控件默認(rèn)使用IE9,IE10的方法

文章來源:365jz.com     點(diǎn)擊數(shù):1580    更新時(shí)間:2018-05-30 02:16   參與評(píng)論
方法一:
有沒有辦法使我的WebBrowser控件的使用的IE版本高點(diǎn)呢?查找到了MSDN的一篇文章,上面有詳細(xì)的說明,簡(jiǎn)單翻譯如下:
1,打開注冊(cè)表
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
    SOFTWARE
       Microsoft
          Internet Explorer
             Main
                FeatureControl
                   FEATURE_BROWSER_EMULATION
                      contoso.exe = (DWORD) 00000000
其中的"contoso.exe"為您的程序名字.即嵌入了WebBrowser控件的可執(zhí)行程序的名字.
后面的數(shù)值"00000000"代表WebBrowser控件使用的IE的版本,值對(duì)應(yīng)的IE版本如下:

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.



如果您使用的是64位的操作系統(tǒng),而你的程序是32位的,那么你則要在以下注冊(cè)表中更改該值.
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
SOFTWARE
Wow6432Note
Microsoft
Internet Explorer
Main
FeatureControl
FEATURE_BROWSER_EMULATION
contoso.exe = (DWORD) 00000000

360瀏覽器,傲游瀏覽器,淘寶瀏覽器等都可以用這種方式來操作.

注意: 我使用VS2010編譯的時(shí)候,如果是Debug模式,那么我在注冊(cè)表中更改的內(nèi)容無效;如果使用了Release模式,則注冊(cè)表的內(nèi)容立即生效!

.reg 寫法:

將下面的代碼保存為:IE11.reg,365jz.exe 改成你程序的名稱。

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION]
"365jz.exe"=dword:00002AF8
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION]
"365jz.exe"=dword:00002AF8


 方法二

在html頭 加標(biāo)簽 強(qiáng)制使用最新的ie渲染 <meta http-equiv="X-UA-Compatible" content="IE=edge">

強(qiáng)制使用最新的ie8渲染<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>

如對(duì)本文有疑問,請(qǐng)?zhí)峤坏浇涣髡搲瑥V大熱心網(wǎng)友會(huì)為你解答??! 點(diǎn)擊進(jìn)入論壇

發(fā)表評(píng)論 (1580人查看0條評(píng)論)
請(qǐng)自覺遵守互聯(lián)網(wǎng)相關(guān)的政策法規(guī),嚴(yán)禁發(fā)布色情、暴力、反動(dòng)的言論。
昵稱:
最新評(píng)論
------分隔線----------------------------

其它欄目

· 建站教程
· 365學(xué)習(xí)

業(yè)務(wù)咨詢

· 技術(shù)支持
· 服務(wù)時(shí)間:9:00-18:00
365建站網(wǎng)二維碼

Powered by 365建站網(wǎng) RSS地圖 HTML地圖

copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號(hào)