[英]Windows desktop application open URL in a new browser window instead of a new tab
I am using Process.Start(url)
to open a url in a new tab in user's browser. 我正在使用
Process.Start(url)
在用户浏览器的新标签页中打开一个url。 However, I want it to be opened in a new browser window instead of a new tab. 但是,我希望在新的浏览器窗口而不是新的选项卡中打开它。 Thanks in advance for your help.
在此先感谢您的帮助。
You can use the overloaded Process.Start(string, string)
which will take command line arguments. 您可以使用将带命令行参数的重载
Process.Start(string, string)
。 Firefox and Chrome both have a command line switch to specify a new window. Firefox和Chrome都有一个命令行开关来指定新窗口。 You'll need to figure out what Browser the client has, and use the appropriate command line args.
您需要找出客户端具有的浏览器,并使用适当的命令行参数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.