|
-
Jan 27th, 2002, 05:15 AM
#1
Thread Starter
Lively Member
Eliminating pop ups in VB browser control
How do I eliminate pop up windows that occur when I load a webpage inside a vb browser control? The program is freezing until a pop up ad loads when I try to get the browser to navigate to a page, this page displays program info that I want to be able to dynamically update, so I used a webpage. I was wondering if anyone knew how I could set the browser so it wouldn't open up pop-up windows? I have seen it done in other programs and it would be great if I could apply it to mine.
Assistance is appreciated, thanks...
-
Jan 27th, 2002, 06:01 AM
#2
PowerPoster
Check the BeforeNavigate event. I am not sure ofthe syntax, but it gives you an option of blocking pop-up windows.
-
Jan 27th, 2002, 11:34 AM
#3
Thread Starter
Lively Member
-
Jan 27th, 2002, 11:36 AM
#4
Fanatic Member
You need to webbrowser controls (web1 and web2) thne use this code and all popups are directed to web2 and then stopped.
VB Code:
Private Sub web1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Set ppDisp = web2.Object
End Sub
Private Sub web2_StatusTextChange(ByVal Text As String)
web2.Stop
End Sub
-
Jan 27th, 2002, 11:55 AM
#5
Thread Starter
Lively Member
Thanks stickman, works great
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|