首页 新闻 会员 周边

设置了程序的web browser 用ie11 启动程序后不生效

0
悬赏园豆:10 [待解决问题]

RegistryKey reg = Registry.LocalMachine;
using (RegistryKey run = reg.OpenSubKey(@"SOFTWARE\WOW6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", true))
{
var key = "ch2.Spider.SiteManager.exe";
var value = run.GetValue(key);
if (value == null)
{
try
{
Int32 tempInt = 0;
unchecked
{
tempInt = (Int32)0x2AF9;
}

                    run.SetValue(key, tempInt, RegistryValueKind.DWord);
                    MessageBox.Show("  当前应用程序已成功写入注册表!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                MessageBox.Show(value.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Console666的主页 Console666 | 初学一级 | 园豆:4
提问于:2020-07-21 18:15
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册