Set WebBrowser Core to IE 11 for Application

private void setReg()
{
string myAppPath = System.IO.Path.GetFileName(System.Reflection.Assembly.GetExecutingAssembly().Location);
RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", true);
int ieVer = 11001;
if (key != null)
{
key.SetValue(myAppPath, ieVer, RegistryValueKind.DWord);
key.SetValue(myAppPath.Replace(".exe", ".vshost.exe"), ieVer, RegistryValueKind.DWord);//调试运行需要加上,否则不起作用
}

key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", true);
if (key != null)
{
key.SetValue(myAppPath, ieVer, RegistryValueKind.DWord);
key.SetValue(myAppPath.Replace(".exe", ".vshost.exe"), ieVer, RegistryValueKind.DWord);//调试运行需要加上,否则不起作用
}
}

Set WebBrowser Core to IE 11 for Application

上一篇:IntelliJ IDEA Debug 快捷键


下一篇:基于 tensorflow的时间序列温度预测 (一)