我正在构建一个Web浏览器,如果单击一个链接,如果该链接包含某个字符串,那么我想要打开另一个程序:
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
答案 0 :(得分:1)
尝试使用
If InStr(e.Url.ToString, "String") Then
Process.Start("Program I want to open")
End if