修改WebBrowser控件的浏览器模式

通过修改注册表键值,我们能够修改WebBrowser控件的浏览器模式:

使用IE7标准模式,我们使用如下的键值:

HKEY_CURRENT_USER\Software\Microsoft\InternetExplorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"MyApplication.exe" = dword 8000 (Hex: 0x1F40)

或者

HKEY_LOCAL_MACHINE\Software\Microsoft\InternetExplorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"MyApplication.exe" = dword 8000 (Hex: 0x1F40)

使用IE8标准模式:

HKEY_CURRENT_USER\Software\Microsoft\InternetExplorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"MyApplication.exe" = dword 7000 (Hex: 0x1B58)

或者

HKEY_LOCAL_MACHINE\Software\Microsoft\InternetExplorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"MyApplication.exe" = dword 7000 (Hex: 0x1B58)

各种模式对应键值表:

IE8 Beta 1

IE8 Beta 2

IE8 RC

IE8 RTM

Feature  Control Key

FEATURE_NATIVE 
 
_DOCUMENT_MODE

FEATURE_BROWSER_EMULATION

IE8 Standards  Mode

80000  (0x13880)

8

8

8000 (0x1F40)

IE7 Standards  Mode

70000  (0x11170)

7

7

7000 (0x1B58)

IE8 Standards  Mode (Forced)

-

-

-

8888 (0x22B8)

你可能感兴趣的:(浏览器,Microsoft,browser,hex,WebBrowser,Standards)