我开始编码,我在我正在创建的VB.NET应用程序中遇到了问题。
在Webbrowser1
中加载新网页时,我希望我的代码打开一个链接,在您自己的网络浏览器中执行,即chrome,Firefox。
我将如何做到这一点?
答案 0 :(得分:0)
Public Class Form1
Dim FirstRun As Boolean = True
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate("http://stackoverflow.com")
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
If Not FirstRun Then Process.Start("http://stackoverflow.com")
FirstRun = False
End Sub
End Class