2个回答
展开全部
可以弄个WebBrowser1控件数组, WebBrowser1(0) WebBrowser1(1)
设计的时候重叠在一起,而后当打开新窗口时,原窗口隐藏,用对应的另一个窗口打开即可
由于两个窗口重叠在了一起,用户也无法觉察到
Dim iNum As Integer
Private Sub Command1_Click()
WebBrowser1(iNum).Navigate "http://www.baidu.com"
End Sub
Private Sub Form_Load()
ShowWeb iNum
End Sub
Private Sub WebBrowser1_NewWindow2(Index As Integer, ppDisp As Object, Cancel As Boolean)
ShowWeb 1 - Index
Set ppDisp = WebBrowser1(1 - Index).Object
End Sub
Private Sub ShowWeb(ByVal i As Integer)
WebBrowser1(i).Visible = True
WebBrowser1(1 - i).Visible = False
End Sub
设计的时候重叠在一起,而后当打开新窗口时,原窗口隐藏,用对应的另一个窗口打开即可
由于两个窗口重叠在了一起,用户也无法觉察到
Dim iNum As Integer
Private Sub Command1_Click()
WebBrowser1(iNum).Navigate "http://www.baidu.com"
End Sub
Private Sub Form_Load()
ShowWeb iNum
End Sub
Private Sub WebBrowser1_NewWindow2(Index As Integer, ppDisp As Object, Cancel As Boolean)
ShowWeb 1 - Index
Set ppDisp = WebBrowser1(1 - Index).Object
End Sub
Private Sub ShowWeb(ByVal i As Integer)
WebBrowser1(i).Visible = True
WebBrowser1(1 - i).Visible = False
End Sub
展开全部
Private Sub Command1_Click()
WebBrowser1.Navigate "www.baidu.com"
End Sub
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Cancel = True
WebBrowser1.Navigate URL
End Sub
WebBrowser1.Navigate "www.baidu.com"
End Sub
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Cancel = True
WebBrowser1.Navigate URL
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询