把WebBrowser1設為控制元件陣列(就是把它的Index屬性設為0),然後輸入以下程式碼:
Private Sub WebBrowser1_NewWindow2(index As Integer, ppDisp As Object, Cancel As Boolean)
Load WebBrowser1(WebBrowser1.UBound + 1)
WebBrowser1(WebBrowser1.UBound).Move WebBrowser1(WebBrowser1.UBound - 1).Left + 300, WebBrowser1(WebBrowser1.UBound - 1).Top + 300
WebBrowser1(WebBrowser1.UBound).Visible = True
WebBrowser1(WebBrowser1.UBound).ZOrder
Set ppDisp = WebBrowser1(WebBrowser1.UBound).Object
End Sub
以上只是示例,具體新的WebBrowser視窗的顯示位置你可以自己修改
把WebBrowser1設為控制元件陣列(就是把它的Index屬性設為0),然後輸入以下程式碼:
Private Sub WebBrowser1_NewWindow2(index As Integer, ppDisp As Object, Cancel As Boolean)
Load WebBrowser1(WebBrowser1.UBound + 1)
WebBrowser1(WebBrowser1.UBound).Move WebBrowser1(WebBrowser1.UBound - 1).Left + 300, WebBrowser1(WebBrowser1.UBound - 1).Top + 300
WebBrowser1(WebBrowser1.UBound).Visible = True
WebBrowser1(WebBrowser1.UBound).ZOrder
Set ppDisp = WebBrowser1(WebBrowser1.UBound).Object
End Sub
以上只是示例,具體新的WebBrowser視窗的顯示位置你可以自己修改