B. Clay Shannon B. Clay Shannon - 1 year ago 99
C# Question

How can I get the WebBrowser control to show modern contents?

I've created a Winforms app that uses a WebBrowser control; I dynamically assign its Uri. It worked fine for awhile, but now I'm getting this msg:

You seem to be using an unsupported browser. Older browsers can put your security at risk, are slow and don't work with newer Google Maps features. To access Google Maps, you'll need to update to a modern browser.

The last two words are a link, and following that link, I see:

You are currently using...
IE 11

So, okay, the WebBrowser component uses IE 11; how can I change that?

My machine is set to use Chrome as its browser; perhaps the control should use whatever your current browser is? I don't know if that's possible/feasible.


Okay, I'm willing to give Reza's suggestion a try. But when I navigate to the specified spot in regedit, and right-click in the right pane to add a New entry, it has three options:

Key, String Value, Binary Value

I reckon the string values are the ".exe" strings, and the Binary values are the "dword" vals, but what should the "Key" values be?

Answer Source

The WebBrowser control uses the same Internet Explorer version which is installed on your OS in Compatibility Mode. But you can disable Compatibility Mode in Web Browser control. You can follow instructions here to disable the setting using registry.

I applied settings in HKEY_CURRENT_USER to make it work:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

and this values:


It make the browser control use Internet Explorer 11 so Webpages are displayed in IE11 edge mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directive causes the page to load in Quirks.

enter image description here

Right click on an empty area of the right pane, then in the window which appears after selecting dword value, choose hexadecimal and enter 2af9.