C#使用命令行启动一个全屏的edge浏览器。下面直接上源码:
private void OpenApp()
{
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.FileName = "msedge";
startInfo.Arguments = "https://lebang2020.cn --start-fullscreen";
startInfo.UseShellExecute = true;
startInfo.RedirectStandardInput = false;
startInfo.RedirectStandardOutput = false;
startInfo.RedirectStandardError = false;
startInfo.CreateNoWindow = true;
_browserProcess = System.Diagnostics.Process.Start(startInfo);
}
运行上面代码后是不是一个全屏的浏览器就打开了?