简体   繁体   English

仅使用1个选项卡的Process.Start(URL)

[英]Process.Start(URL) using only 1 tab

I am sorry if I am posting a common question, if thats what this is. 很抱歉,如果我发布一个常见问题,请问这是什么。 I am not sure how to look this up to find a good answer as to how to do this though. 我不知道如何查找此内容,但是如何找到一个好的答案。 I have searched for days about this, and with no answers, my last resort is to ask :) 我已经搜寻了好几天,但没有答案,我最后的办法是问:)

I have this C# application I have been working on for a while off and on these past few years. 在过去的几年中,我一直在研究这个C#应用程序。 The most recent request is to use the Link labels I am using to show info, and to bring a URL up in a browser. 最近的请求是使用我正在使用的链接标签显示信息,并在浏览器中显示URL。 I am using this: 我正在使用这个:

System.Diagnostics.Process.Start(URL); System.Diagnostics.Process.Start(URL);

The trouble is, I feel this is going to cause issues since hundreds of clicks is a possibility, I want to make it so that it only uses 1 tab, instead of opening new tabs every time another link is clicked. 麻烦是,我认为这将引起问题,因为可能会有数百次点击,因此我想使其仅使用1个标签,而不是每次单击另一个链接时都打开新标签。 Is this possible? 这可能吗? Am I using the wrong process to do what I want? 我使用错误的流程来做我想要的吗?

If you want to force the usage of IE, you can do this: 如果要强制使用IE,可以执行以下操作:

Process.Start("IEXPLORE.EXE","–framemerging URL");

For more info: https://msdn.microsoft.com/en-us/library/ie/hh826025%28v=vs.85%29.aspx 有关更多信息: https : //msdn.microsoft.com/zh-cn/library/ie/hh826025%28v=vs.85%29.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM