MaGiCmAn 发表于 2013-9-13 19:14:01

[已解决]请问怎么让_IECreateEmbedded使用新IE版本,而不是老版本或IE6兼容模式[gui]

本帖最后由 MaGiCmAn 于 2013-9-13 21:31 编辑

$sURL="http://alphatown.com/"
Local $hWnd = GUICreate($sURL, 1280,800, -1, -1)
Local $oIE= _IECreateEmbedded()
$GUIActiveX = GUICtrlCreateObj($oIE,-1, -1, 1280, 800)
_IENavigate($oIE, $sURL)
GUISetState()GUI里面打开是这个样子的(应该是ie6或者兼容模式)

浏览器打开则是这个样子(IE8)

我在帮助文档、论坛、百度、谷歌搜索过都不得其所,不知道是不是关键字选得不好(autoit IE IE6 版本 兼容性 _IECreateEmbedded……等等各种组合各种搜)
请教高手们:怎么样才能在GUI中用我的浏览器真实版本(IE8)打开呢?

MaGiCmAn 发表于 2013-9-13 21:27:58

找到答案了
http://www.autoitscript.com/forum/topic/144996-iecreateembedded-embed-old-ie-version-7-when-9-is-installed-please-help-thanks/


Feature Delegation via Registry Hacks

Fortunately starting with Internet Explore 8 and later there’s a fix for this problem via a registry setting. You can specify a registry key to specify which rendering mode and version of IE should be used by that application. These are not global mind you – they have to be enabled for each application individually.
There are two different sets of keys for 32 bit and 64 bit applications.
32 bit:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION
Value Key: yourapplication.exe

64 bit:

HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION
Value Key: yourapplication.exe

The value to set this key to is (taken from MSDN here) as decimal values:
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.

MaGiCmAn 发表于 2013-9-13 21:30:42

就是写个注册表,强制IE嵌入使用某个版本的IE
譬如
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION","xxx.exe","REG_DWORD","8888")
xxx.exe是你的程序名,8888表示强制使用ie8

heavenm 发表于 2013-9-14 05:59:47

- -#有这种事情
留个记号
要改注册表还是比较麻烦的样子

zhybxyz 发表于 2013-9-15 12:02:56

这论坛90%的问题都是自行解决的,很少有人帮忙,呵呵,这又一个。

MaGiCmAn 发表于 2013-9-15 22:15:15

回复 5# zhybxyz

对我来说是100%。{:face (319):}
不过我情愿相信这是由于我的问题太低阶,并且没有善用搜索(哪怕是在谷歌上搜索英文资料)就发表而造成的。

1361739590 发表于 2013-11-29 00:03:47

标记   学习

ak47gglllk 发表于 2014-10-30 09:10:20

学习下,非常感谢,非常感谢

cxlater 发表于 2016-3-14 19:14:30

标记一下今天用到了感谢楼主

zhuang513 发表于 2016-7-22 02:36:41

留个记号
非常有用

tank 发表于 2016-8-21 20:39:18

今天用到了感谢楼主

aqtd 发表于 2016-8-29 08:36:17

留个记号,备用。

1361739590 发表于 2016-9-1 16:16:55

同样标记一下                  备用

pigWoWo 发表于 2017-1-23 22:11:49

学习了{:face (171):}
页: [1]
查看完整版本: [已解决]请问怎么让_IECreateEmbedded使用新IE版本,而不是老版本或IE6兼容模式[gui]