问题描述:
我参考了
https://blog.csdn.net/liuhuanping/article/details/132091016
里面的代码,用于额外打开一个浏览器进程,里面调用的是chome浏览器,
但是让我头疼的时是,客户那边没有chome浏览器,如果换成Edge浏览器,
我发现虽然可以打开网页,但是无法全屏。
代码段如下
string browserPath = @"C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe"; // 替换为你的浏览器安装路径
string url = "https://www.google.com"; // 替换为你想打开的URL
try
{
ProcessStartInfo psi = new ProcessStartInfo(browserPath);
psi.Arguments = $"--app={url} --start-fullscreen --disable-address-bar --disable-infobars";
Process.Start(psi);
}
catch (Exception ex)
{
Console.WriteLine("Error opening the browser: " + ex.Message);
}
提出问题:
如果换成Edge浏览器,怎样实现全屏打开呢?参数Arguments要如何设置,
或者有其它的实现方式呢?
恳请大家帮忙指点,感谢!