. Web Browser control–specifying the IE Version
Http://www.west-wind.com/weblog/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version
I Use the Internet Explorer Web Browser Control in a lot of my applications to display document type layout. HTML happens to is one of the most common document formats and displaying data in this format–even in desktop Applicatio NS, is often-easier than using normal desktop technologies.
One issue the Web Browser Control has this it ' s perpetually stuck in IE 7 (MSIE 7.0) rendering mode by default. Even though IE 8 and now 9 has significantly upgraded the IE rendering engine to being more CSS and HTML compliant by Defaul t the Web Browser control would have none of it. IE 9 in Particular–with it much improved CSS support and basic HTML 5 support is a big improvement and even though the IE control uses some of IE ' s internal rendering technology It's still stuck in the old IE 7 (MSIE 7.0) rendering by Defaul T.
This applies whether your ' re using the Web Browser control in a WPF application, a WinForms app, a FoxPro or VB classic app Lication using the ActiveX control. Behind The scenes all these UI platforms use of the COM interfaces and so your ' re stuck by those same rules.
Feature Delegation via Registry Hacks
Fortunately starting with the 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 is used by that application. These is not the global mind You–they has to is enabled for each application individually.
There is different sets of the keys for the + bit and the applications.
[(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE) \SOFTWARE\Microsoft\Internet Explorer\main\featurecontrol\feature_ Browser_emulation]
+ bit:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\main\featurecontrol\feature_browser_emulation
Value Key:yourapplication.exe
A bit:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\main\featurecontrol\feature_browser_emulation
Hkey_local_machine\software\wow6432node\microsoft\internet Explorer\main\featurecontrol\feature_browser_ EMULATION
Value Key:yourapplication.exe
The value to set of this key to be (taken from MSDN here) as decimal values:
9999 (0x270f)
Internet Explorer 9. Webpages is displayed in IE9 standards mode, regardless of the! DOCTYPE directive.
9000 (0x2328)
Internet Explorer 9. Webpages containing standards-based! DOCTYPE directives is displayed in IE9 mode.
8888 (0X22B8)
Webpages is displayed in IE8 standards mode, regardless of the! DOCTYPE directive.
8000 (0X1F40)
Webpages containing standards-based! DOCTYPE directives is displayed in IE8 mode.
7000 (0x1b58)
Webpages containing standards-based! DOCTYPE directives is displayed in IE7 standards mode.
Specify IE kernel version for WebBrowser (MSIE 7.0)