0

If i create a WindowsForms Application with a WebBrowser, does it use the current IE Version i have installed on my computer?

And if i give this Application to someone else, and the other person has a older IE installed, does the Application then use the older IE, that is installed on the other's person computer?

AlpakaJoe
  • 533
  • 5
  • 24
  • Yes and no. It uses whatever IE is installed on their PC, but at least for native apps it defaults the behavior to acting as IE 7 for backwards compatibility. You have to set registry keys to tell Windows to run IE as the actual version. For .NET perhaps you can use a manifest entry instead? – Dave S Nov 26 '18 at 19:31
  • 1
    Possible duplicate of [Use latest version of Internet Explorer in the webbrowser control](https://stackoverflow.com/questions/17922308/use-latest-version-of-internet-explorer-in-the-webbrowser-control) – Fabio Nov 26 '18 at 19:36
  • 1
    [How can I get the WebBrowser control to show modern contents?](https://stackoverflow.com/q/38514184/3110834) – Reza Aghaei Nov 26 '18 at 19:36

1 Answers1

1

It always uses IE 7's rendering mode. To change it you need to make a registry change:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

or for a 32bit application on a 64bit machine:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

set the keyname to be the name of your application executable then the value to:

11001 (0x2AF9) - force IE 11 mode 11001 (0x2AF8) - IE 11 mode

See Rick Strahl's blog post for more information. This answer is based on that.

If you make the registry change on your PC to force IE 11 rendering then give the application to someone else their PC will use IE 7 rendering unless you make the same registry change on their machine.

Handbag Crab
  • 1,488
  • 2
  • 8
  • 12
  • As mentioned in the blog, this also controls the user-agent sent by the web control. Without the registry entry the control will send a user-agent of IE 7 unless you've set a custom agent. – Dave S Nov 26 '18 at 19:37