This question seems to have a simple answer, the WebBrowser control uses the version of Internet Explorer currently installed on the system, but you could be surprised running a simple program with a WebBrowser control and navigating to a site like www.chisono.it

image

This answer can surprise you, because I have IE9 installed, but the WebBrowser control seems to use the IE7 engine, and you can verify running an acid test (http://acid3.acidtests.org/) that this is indeed not only a problem of UserAgent, but the rendering engine is not of IE9

image

Clearly the test failed to run, and this is a confirmation that the WebBrowser is actually running an IE7 engine. The real reason behind this is explained in this msdn article that clearly states that the Registry Key

HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
SOFTWARE
Microsoft
Internet Explorer
Main
FeatureControl
FEATURE_BROWSER_EMULATION

Is responsible to determine the level of emulation for applications. If have an application called WebBrowserWinform.exe and you want it to run the WebBrowser as IE9 you should add this key.

image

And now you can run again the program to verify with acid test that rendering engine used by the WebBrowserControl is now the correct one.

image

Ok, this is the standard result for IE9 and if you like you can also check www.chisono.it to have a confirmation of UserAgent string

image

You can also use wildcard, as an example, I want every program that uses a WebBrowser control to use the IE9 version for current user, so I decided to add this key.

image

This gives me a good default to work with Smile.

alk.

4 Responses to “Witch version of browser is used by the WebBrowser control?”

  1. after i changed the registry to use IE9 as browser rendering engine my proxy settings are not working properly.
    please help me in this

  2. It sounds strange… but you can simply remove the FEATURE_BROWSER_EMULATION registry value and everythign should reverted to the default. I never had problem with proxies and FEATURE_BROWSER_EMULATION.

  3. Which witch is witch, thanks for the article

  4. doh!
    Which witch is which…