Moslem7026 Moslem7026 - 4 months ago 113
C# Question

Use latest version of Internet Explorer in the webbrowser control

The default version of the webbrowser control in a C# Windows Forms
application is 7. I have changed to 9 by the article Browser Emulation, but how is it possible to use the latest version of the installed Internet Explorer in a webbrowser control?


I saw Veer's answer. I think it's right, but it did not I work for me. Maybe I am using .NET 4 and am using 64x OS so kindly check this.

You may put in setup or check it in start-up of your application:

private void Form1_Load(object sender, EventArgs e)
    var appName = Process.GetCurrentProcess().ProcessName + ".exe";

private void SetIE8KeyforWebBrowserControl(string appName)
    RegistryKey Regkey = null;
        // For 64 bit machine
        if (Environment.Is64BitOperatingSystem)
            Regkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\\Wow6432Node\\Microsoft\\Internet Explorer\\MAIN\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
        else  //For 32 bit machine
            Regkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);

        // If the path is not correct or
        // if the user haven't priviledges to access the registry
        if (Regkey == null)
            MessageBox.Show("Application Settings Failed - Address Not found");

        string FindAppkey = Convert.ToString(Regkey.GetValue(appName));

        // Check if key is already present
        if (FindAppkey == "8000")
            MessageBox.Show("Required Application Settings Present");

        // If a key is not present add the key, Key value 8000 (decimal)
        if (string.IsNullOrEmpty(FindAppkey))
            Regkey.SetValue(appName, unchecked((int)0x1F40), RegistryValueKind.DWord);

        // Check for the key after adding
        FindAppkey = Convert.ToString(Regkey.GetValue(appName));

        if (FindAppkey == "8000")
            MessageBox.Show("Application Settings Applied Successfully");
            MessageBox.Show("Application Settings Failed, Ref: " + FindAppkey);
    catch (Exception ex)
        MessageBox.Show("Application Settings Failed");
        // Close the Registry
        if (Regkey != null)

You may find, just for testing.

Keys are as the following;

9999 (0x270F) - Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.

9000 (0x2328) - Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode.

8888 (0x22B8) - Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.

8000 (0x1F40) - Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode.

7000 (0x1B58) - Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode.

I saw applications like Skype use 10001. I do not know.


The setup application will change the registry. You may need to add a line in the Manifest File to avoid errors due to permissions of change in registry:

<requestedExecutionLevel level="highestAvailable" uiAccess="false" />