如何在WebBrowser控件中点击一个连接的时候,在弹出新IE窗体让他显示在WebBrowser 10
1个回答
展开全部
Private Sub Command1_Click()
WebBrowser1.Navigate "news.baidu.com"
End Sub
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Cancel = True
WebBrowser1.Navigate2 WebBrowser1.Document.activeElement.href
End Sub
如果在新窗口打开,用:
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Cancel = True
Dim frm As New Form1
frm.Show
frm.WebBrowser1.Navigate2 WebBrowser1.Document.activeElement.href
End Sub
WebBrowser1.Navigate "news.baidu.com"
End Sub
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Cancel = True
WebBrowser1.Navigate2 WebBrowser1.Document.activeElement.href
End Sub
如果在新窗口打开,用:
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Cancel = True
Dim frm As New Form1
frm.Show
frm.WebBrowser1.Navigate2 WebBrowser1.Document.activeElement.href
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询