【问题标题】:How to change default browser in Visual Studio 2019?如何在 Visual Studio 2019 中更改默认浏览器?
【发布时间】:2021-02-23 08:54:09
【问题描述】:

它是默认的 Internet Explorer 旧版本,因此无法与 youtube 一起正常工作,我尝试在 Visual Studio 中搜索更改浏览器的选项,但我发现它已被阻止,既不阻止也不可更改。就像我添加“Web Browser”元素一样。

【问题讨论】:

    标签: visual-studio visual-studio-2019


    【解决方案1】:

    C#:

            var AppName = System.Diagnostics.Process.GetCurrentProcess().ProcessName + ".exe";
            using (var Key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", true))
                Key.SetValue(AppName, 99999, RegistryValueKind.DWord);
            webBrowser1.Navigate("https://www.google.com");
    

    现在插入 Webbrowser 元素。

    【讨论】:

    • 嗯,它只会更改网址,但 Internet Explorer 仍将保留
    • 是的,但它会升级它模拟更好的浏览器(我认为仅适用于 Windows 10)
    猜你喜欢
    • 2017-07-03
    • 2011-01-27
    • 1970-01-01
    • 1970-01-01
    • 2010-11-05
    • 2019-03-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-17
    相关资源
    最近更新 更多