How to set the default kernel for a WebBrowser control

Source: Internet
Author: User

Original: How to set the default kernel for the WebBrowser control

The default kernel for WebBrowser is IE6, and this article describes how to set the default kernel for WebBrowser controls to have IE8 or other versions.

Original title: How to set the rendering mode of the IE8 WebBrowser control (MSHTML)

IE8 has made great changes in the rendering engine, adding a new standard mode (Standard modes). Many software are embedded in IE WebBrowser control (that is, MSHTML.dll) to display the Web page, when the user's machine upgrade to IE8, WebBrowser control will also be upgraded to the IE8 rendering engine.

To ensure that the applications that use the WebBrowser control work as they did, the IE8 WebBrowser control uses the IE7 rendering mode (that is, IE8 view (compatible view) mode in compatible) by default.

Add the standard mode that you want the WebBrowser control's render mode programming IE8 to be implemented by setting the registry feature_browser_emulation.

Example:

[(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE) \SOFTWARE\Microsoft\Internet Explorer\main\featurecontrol\feature_ Browser_emulation]
"MyApplication.exe" = DWORD 8000 (HEX:0X1F40)

Here MyApplicaiton.exe is the EXE filename for your application. 8000 represents the 8.0 rendering mode, please refer to the following table:


IE8 Standards Mode 8000 (0X1F40)--IE8 Standard mode (Standard mode), IE8 default pattern


IE7 Standards Mode 7000 (0X1B58)--IE7 compatible view mode (compatible view), IE8 WebBrowser control default mode

IE8 Standards Mode (forced) 8888 (0X22B8)--IE8 enforces standard modes and does not attempt to use Compatible view mode in the event of a render failure


This article from the "Internet Explorer Research and Development" blog, reprinted please contact the author.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.