src/Program.cs
/// <summary>
/// Sets WebBrowser components to IE11 mode, rather than default IE7,
/// which is really not suitable for anything.
/// </summary>
Sets WebBrowser components to IE11 mode, rather than default IE7,
which is really not suitable for anything.
Sets WebBrowser components to IE11 mode rather than default IE7 which is really not suitable for anything .
static void WebBrowserEmulationSet()
        {
            try
            {
                using (
                    var rk = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(
                    @"SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", true)
                )
                {
					if (rk == null) return;
                    string appname = System.IO.Path.GetFileName(Application.ExecutablePath);
                    dynamic value = rk.GetValue(appname);
                    if (value == null)
                        rk.SetValue(appname, (uint)11001, Microsoft.Win32.RegistryValueKind.DWord);
                }
            }
            catch (Exception E)
            {
                MessageBox.Show("Something went wrong:" + Environment.NewLine + E.Message);
            }
        }
static void WebBrowserEmulationSet ( ) { try { using ( var rk = Microsoft . Win32 . Registry . CurrentUser . OpenSubKey ( @"SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" , true ) ) { if ( rk == null ) return ; string appname = System . IO . Path . GetFileName ( Application . ExecutablePath ) ; dynamic value = rk . GetValue ( appname ) ; if ( value == null ) rk . SetValue ( appname , ( uint ) 11001 , Microsoft . Win32 . RegistryValueKind . DWord ) ; } } catch ( Exception E ) { MessageBox . Show ( " " + Environment . NewLine + E . Message ) ; } }
Sets WebBrowser components to IE11 mode, rather than default IE7,
which is really not suitable for anything.
Sets WebBrowser components to IE11 mode rather than default IE7 which is really not suitable for anything .