Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
On Error Resume Next
Cancel = True '禁止弹窗和打开新窗口
End Sub
或者要弹 也不要弹出来 (把他限制一下 别到处乱弹)
也可以把弹出内容像现在的浏览器一样 只在一个窗体里面 谢谢!
6 个解决方案
#1
别着急,你还没碰到播放音乐和Flash的窗口呢
#2
不着急 慢慢找 慢慢等
#3
这个好象也需要在IE中设置
我估计是修改注册表中的某个地方
当时没多大兴趣了就没去找
我估计是修改注册表中的某个地方
当时没多大兴趣了就没去找
#4
期待中,还有什么烦人的电信推送技术,你不想看都不行.....
#5
飘过
#6
试试这个
Dim WithEvents Web_V1 As SHDocVwCtl.WebBrowser_V1
Private Sub Form_Load()
Set Web_V1 = WebBrowser1.Object
End Sub
Private Sub Web_V1_NewWindow(ByVal URL As String, ByVal Flags As Long, ByVal TargetFrameName As String, PostData As Variant, ByVal Headers As String, Processed As Boolean)
Processed = True
WebBrowser1.Navigate URL
End Sub
#1
别着急,你还没碰到播放音乐和Flash的窗口呢
#2
不着急 慢慢找 慢慢等
#3
这个好象也需要在IE中设置
我估计是修改注册表中的某个地方
当时没多大兴趣了就没去找
我估计是修改注册表中的某个地方
当时没多大兴趣了就没去找
#4
期待中,还有什么烦人的电信推送技术,你不想看都不行.....
#5
飘过
#6
试试这个
Dim WithEvents Web_V1 As SHDocVwCtl.WebBrowser_V1
Private Sub Form_Load()
Set Web_V1 = WebBrowser1.Object
End Sub
Private Sub Web_V1_NewWindow(ByVal URL As String, ByVal Flags As Long, ByVal TargetFrameName As String, PostData As Variant, ByVal Headers As String, Processed As Boolean)
Processed = True
WebBrowser1.Navigate URL
End Sub