[Switch: IE programming] how to set the rendering mode of the IE8 WebBrowser control (MSHTML)

Source: Internet
Author: User

[IE programming] how to set the rendering mode of the IE8 WebBrowser control (MSHTML)
IE8 has made great changes in the rendering engine, adding a Standard Mode ). Many software are embedded with the IE WebBrowser control (MSHTML. dll) to display webpages. When the user machine is upgraded to IE8, The WebBrowser control will also be upgraded to the rendering engine of IE8.

To ensure that the applications using the WebBrowser control can work the same way as before, the WebBrowser control of IE8 uses the rendering mode of IE7 by default (that is, the Compatible View (Compatible View) mode in IE8 ).

Add the standard mode of IE8 that you want to program the rendering mode of the WebBrowser control. You can set 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)

Myapplicaiton.exe is the EXE file name of your application. 8000 indicates the rendering mode of 8.0. See the following table:

IE8 Standards Mode 8000 (0x1F40) -- IE8 Standard Mode, IE8 default Mode

IE7 Standards Mode 7000 (0x1B58) -- IE7 Compatible View Mode (Compatible View), default Mode of IE8 WebBrowser Control

IE8 Standards Mode (Forced) 8888 (0x22B8) -- IE8 enforces standard Mode and does not try to use compatible view Mode when rendering fails.

 

From: http://blog.csdn.net/WinGeek/archive/2009/03/25/4022102.aspx

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.