VB 程序 如何等网页加载完毕以后再执行下面的代码 跪求!!!

VB 程序 如何等网页加载完毕以后再执行下面的代码 跪求!!!
2024-12-22 22:37:24
推荐回答(3个)
回答1:

Private Sub Form_Load()
WebBrowser1.Navigate "www.sina.com"
End Sub

Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If URL = "www.sina.com" Then MsgBox "加载完毕"
End Sub

回答2:

Private Sub WebBrowser1_NavigateError(ByVal pDisp As Object, URL As Variant, Frame As Variant, StatusCode As Variant, Cancel As Boolean)

执行的代码

End Sub

回答3:

webrowser的DOCUMENTCOMPLETE事件,