我开始编码,我在创建的 VB.NET 应用程序中遇到了问题。
当加载一个新网页时,Webbrowser1
我希望我的代码打开一个链接以在您自己的网络浏览器中执行,即 chrome、Firefox。
我该怎么做呢?
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