关于IE9浏览器控件控件、浏览器

2023-09-07 01:15:11 作者:有谁比你伤我深?

我最近升级到IE9-β。现在,在我的。NET(3.5)的WinForm应用程序,我想用 web浏览器控制。

I recently upgraded to IE9-beta. Now, In my .Net (3.5) WinForm application I want to use WebBrowser control.

所以我的问题是,无论是 web浏览器控制将呈现IE9的所有属性和功能?

So my question is, whether the WebBrowser control will exhibit all properties and functions of IE9?

我关心的是,我想呈现一些SVG图形就可以了。

My concern is, I want to render some SVG graphics on it.

推荐答案

IE9的版本WebBrowser控件,像IE8版本,实际上是几种浏览器于一体。不同的是IE8版本,你必须通过改变DOCTYPE多一点控制页面内的渲染模式。当然,更改浏览器的模式,你必须设置你的注册表,如早期的答案。下面是一个reg文件片段FEATURE_BROWSER_EMULATION:

The IE9 "version" of the WebBrowser control, like the IE8 version, is actually several browsers in one. Unlike the IE8 version, you do have a little more control over the rendering mode inside the page by changing the doctype. Of course, to change the browser mode you have to set your registry like the earlier answer. Here is a reg file fragment for FEATURE_BROWSER_EMULATION:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"contoso.exe"=dword:00002328

下面是一套完整的codeS:

Here is the complete set of codes:

9999(0x270F) - Internet Explorer 9的。 网页显示在IE9 标准模式下,不管中, !DOCTYPE指令。 9000(0x2328) - 的Internet Explorer 9的网页包含基于标准的DOCTYPE 指令显示在IE9模式。 8888(0x22B8) -Webpages是 在IE8标准模式中显示, 不管!DOCTYPE指令。 8000(0x1F40) - 含网页 基于标准!​​DOCTYPE指令 显示在IE8模式。 7000(0x1B58) - 含网页 基于标准!​​DOCTYPE指令 显示在IE7标准模式。 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.

完整的文档:

http://msdn.microsoft.com/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation