2011-03-09 165 views

回答

1

这里亚去:

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 
+0

Ick,对不起,我没有看到帖子上的VB标签。如果你需要翻译,我可以做到这一点,但大多数应该复制非常无痛。 – 2011-03-09 23:23:02

+0

非常感谢,它工作得很好。 – Ugleh 2011-03-11 05:12:15