Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 C# WebBrowser 控件中托管 YouTube Embedded Player。当我单击“在 YouTube 上观看”按钮时,IE 会打开。有什么方法可以在默认网络浏览器中打开链接,例如 Chrome?
像这样的例子:
private void browser_Navigating(object sender, WebBrowserNavigatingEventArgs e) { System.Diagnostics.Process.Start(e.Url.ToString()); e.Cancel = true; }
说明:更改导航处理程序以处理 URL 并触发诊断中的链接(这将在用户的默认浏览器中打开 URL)。