![](/img/trans.png)
[英]How to launch a url in the new window of legacy edge browser using C#
[英]How to launch a url in the new window of firefox browser using C#
我想在 firefox 瀏覽器的新 window 中啟動我的 url。 到目前為止,每次我啟動 url 時,都會在現有的 window 中添加一個新選項卡,這是我不想要的。
這是我的一段代碼:
Uri url = new Uri("https://www/google.com");
Process.Start(new ProcessStartInfo
{
FileName = "firefox.exe",
Arguments = url.ToString() + "--new window",
WindowStyle = ProcessWindowStyle.Normal
});
您的 arguments 順序錯誤*,並且您在“新窗口”之前使用了太多破折號; 正確的順序是:
Arguments = "-new-window " + url.ToString(),
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.