我做了一个简单的浏览器,如何让新网址在我的浏览器里打开?

发布网友 发布时间:2022-04-24 11:23

我来回答

2个回答

热心网友 时间:2023-10-11 02:38

Private WithEvents wb As WebBrowser_V1

Private Sub Form_Load()
WebBrowser1.Navigate "http://www.baidu.com"
Set wb = WebBrowser1.Object
End Sub

Private Sub wb_NewWindow(ByVal URL As String, ByVal Flags As Long, ByVal TargetFrameName As String, PostData As Variant, ByVal Headers As String, Processed As Boolean)
WebBrowser1.Navigate URL
Processed = True
End Sub

热心网友 时间:2023-10-11 02:38

Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Cancel = True
WebBrowser1.Navigate2 WebBrowser1.Document.activeElement.href
End Sub

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com