1. 程式人生 > >VB WebBrowser1設定核心版本

VB WebBrowser1設定核心版本

加入登錄檔

Set x = CreateObject("wscript.shell")
b=x.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION\" & App.EXEName)
If b = "" Then
Set x = Nothing
Dim w
Set w = CreateObject("wscript.shell")
w.regwrite"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION\" & App.EXEName, "2711", "REG_DWORD"
Set w = Nothing
Else
Set x = Nothing
End If

 

 

On Error GoTo Err1
Dim LinkName As String
LinkName = CreateObject("Wscript.Shell").RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION")
If LinkName <> "" Then
Set x = Nothing
Dim w
Set w = CreateObject("wscript.shell")
w.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION\" & App.EXEName + ".exe", "2711", "REG_DWORD"
Set w = Nothing
Else
Set x = Nothing
End If
Exit Sub
Err1:
Exit Sub

FEATURE_BROWSER_EMULATION設定說明
說明
10001 (0x2711) Internet Explorer 10。網頁以IE 10的標準模式展現,頁面!DOCTYPE無效
10000 (0x02710) Internet Explorer 10。在IE 10標準模式中按照網頁上!DOCTYPE指令來顯示網頁。Internet Explorer 10 預設值。
9999 (0x270F) Windows Internet Explorer 9. 強制IE9顯示,忽略!DOCTYPE指令
9000 (0x2328) Internet Explorer 9. Internet Explorer 9預設值,在IE9標準模式中按照網頁上!DOCTYPE指令來顯示網頁。
8888 (0x22B8) Internet Explorer 8,強制IE8標準模式顯示,忽略!DOCTYPE指令
8000 (0x1F40) Internet Explorer 8預設設定,在IE8標準模式中按照網頁上!DOCTYPE指令展示網頁
7000 (0x1B58) 使用WebBrowser Control控制元件的應用程式所使用的預設值,在IE7標準模式中按照網頁上!DOCTYPE指令來展示網頁。

注:11000(0×2af8)    IE11