0

我正在构建一个网络浏览器,如果单击一个链接,如果该链接包含某个字符串,那么我希望打开一个不同的程序:

Private Sub WebBrowser1_Navigated(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles WebBrowser1.Navigated
If WebBrowser1.Document.Links.Contains("STRING") Then
        Process.Start("PROGRAM I WANT TO OPEN")
End If
End Sub
4

1 回答 1

1

Try using

If InStr(e.Url.ToString, "String") Then
   Process.Start("Program I want to open")
End if
于 2013-03-29T01:16:44.493 回答