Results 1 to 5 of 5

Thread: Eliminating pop ups in VB browser control

  1. #1

    Thread Starter
    Lively Member Scorpion965's Avatar
    Join Date
    Jan 2002
    Location
    Laguna Hills, CA
    Posts
    100

    Exclamation 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...

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    Check the BeforeNavigate event. I am not sure ofthe syntax, but it gives you an option of blocking pop-up windows.

  3. #3

    Thread Starter
    Lively Member Scorpion965's Avatar
    Join Date
    Jan 2002
    Location
    Laguna Hills, CA
    Posts
    100
    *bump*

  4. #4
    Fanatic Member stickman373's Avatar
    Join Date
    Mar 2001
    Location
    MA
    Posts
    909
    You need to webbrowser controls (web1 and web2) thne use this code and all popups are directed to web2 and then stopped.


    VB Code:
    1. Private Sub web1_NewWindow2(ppDisp As Object, Cancel As Boolean)
    2.     Set ppDisp = web2.Object
    3. End Sub
    4.  
    5. Private Sub web2_StatusTextChange(ByVal Text As String)
    6. web2.Stop
    7. End Sub


  5. #5

    Thread Starter
    Lively Member Scorpion965's Avatar
    Join Date
    Jan 2002
    Location
    Laguna Hills, CA
    Posts
    100
    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
  •  



Click Here to Expand Forum to Full Width