Question

I have a WebBrowser control in a standard windows forms application.

The machine it is running on has IE11 installed.

Where wbr is an instance of the WebBrowser control, wbr.Version.Major returns 11 meaning it is using IE11.

When pointed at a web page with the following at the top of the document:

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>

Calling document.documentMode in the Javascript returns '8'.

This means the page is rendering in the IE8 document mode (and is reflected in the output, CSS3 properties are not rendered properly).

I also set the browser emulation mode in the registry to both 11001 and 11000 for the application with no apparent effect. (See http://msdn.microsoft.com/en-us/library/ee330730%28v=vs.85%29.aspx#browser_emulation)

Can someone shed some light as to why the IE11 WebBrowser control is setting the document mode to 8 despite having both the doctype and the meta tag defined?

Thanks

Was it helpful?

Solution

While I'm not sure why having the doctype and meta tag set still prevents the WebBrowser control running in IE11 mode, the reason why the registry hack didn't work is due to the difference in 32-bit and 64-bit registries.

If you are editing the registry for a 32-bit application, the registry entries for those applications will be found in an additional directory abstraction called Wow6432Node.

This is where the registry change should be made.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top