如何让VB Webbrowser 中网页中超文本链接在同一窗口中显示
用VBWebbrowser编写的网页浏览器,网页中有超级链接,要跳转到IE窗口中,如何让这些链接仍然再自己的VB浏览器中?...
用VB Webbrowser 编写的网页浏览器,网页中有超级链接,要跳转到IE窗口中,如何让这些链接仍然再自己的VB浏览器中?
展开
1个回答
展开全部
Dim strURL As String
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Cancel = True
WebBrowser1.Navigate strURL
End Sub
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
strURL = Text
End Sub
Private Sub Command1_Click()
WebBrowser1.Navigate "www.163.com"
End Sub
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Cancel = True
WebBrowser1.Navigate strURL
End Sub
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
strURL = Text
End Sub
Private Sub Command1_Click()
WebBrowser1.Navigate "www.163.com"
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询