CodePudding user response:
Please post codeCodePudding user response:
Ole_webBrowser. Object. Navigate (" http://baidu.com ")CodePudding user response:
May be something that page judgment, so cannot be opened in your browser,CodePudding user response:
Vb webbrowser does not pop-up window, and in the original window opens new linkCode 1:
Private Sub WebBrowser1_NewWindow2 (ppDisp As Object, Cancel the As Boolean)
Dim FRM As Form1
The Set FRM=New Form1
FRM. Visible=True
The Set ppDisp=FRM. WebBrowser1. Object
End Sub
Code 2:
Private Sub WebBrowser1_NewWindow2 (ppDisp As Object, Cancel the As Boolean)
Cancel=True
WebBrowser1. Navigate2 WebBrowser1. Document. ActiveElement. Href
End Sub
Code 3:
Private Sub WebBrowser1_NewWindow2 (ppDisp As Object, Cancel the As Boolean)
On the Error Resume Next
Dim frmWB As Form1
The Set frmWB=New Form1
FrmWB. WebBrowser1. RegisterAsBrowser=True
The Set ppDisp=frmWB. WebBrowser1. Object
FrmWB. Visible=True
FrmWB. Top=Form1. Top
FrmWB. Left=Form1. Left
FrmWB. Width=Form1. Width
FrmWB. Height=Form1. Height
End Sub
Function the same, you can choose any one,