0
有没有办法检测出人点击里面WebBrowser1一个链接,然后我可以做vb.net web浏览器链接到默认Web浏览器
Process.Start(TheURL)
,然后返回行动false,所以它不单击web浏览器对象中的链接,然后单击该过程。
有没有办法检测出人点击里面WebBrowser1一个链接,然后我可以做vb.net web浏览器链接到默认Web浏览器
Process.Start(TheURL)
,然后返回行动false,所以它不单击web浏览器对象中的链接,然后单击该过程。
这里亚去:
private void WebBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
e.Cancel = true; // Cancel the event to avoid default behavior
System.Diagnostics.Process.Start(e.Url.ToString()); // Open the link in the default browser
}
编辑:咩,我有几分钟。这里你再去:
Private Sub WebBrowser1_Navigating(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating
e.Cancel = True 'Cancel the event to avoid default behavior
System.Diagnostics.Process.Start(e.Url.ToString()) 'Open the link in the default browser
End Sub
Ick,对不起,我没有看到帖子上的VB标签。如果你需要翻译,我可以做到这一点,但大多数应该复制非常无痛。 – 2011-03-09 23:23:02
非常感谢,它工作得很好。 – Ugleh 2011-03-11 05:12:15