Solved

adding "pop up ads blocking" feature to a custom browser

Posted on 2004-08-08
4
180 Views
Last Modified: 2012-05-05
I am designing a web browser using the microsoft web control , how can I add a "block pop up ads" feature to it ?
0
Comment
Question by:adeljad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
DarkoLord earned 50 total points
ID: 11746151
Hello, use this:

Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
    Set ppDisp = Nothing
    Cancel = True
End Sub

Darko
0
 
LVL 7

Expert Comment

by:Burbble
ID: 11749311
Just a warning, with certain versions of Internet Explorer I have noticed that it tends to crash when you block new windows from opening like that. I would recommend giving the user a choice of enabling/disable it, just in case.

-Burbble
0
 

Author Comment

by:adeljad
ID: 11753699
The problem with this method is that it will block the window even when you right click on a link and choose "open in new window" .
how can I fix that ?
0
 
LVL 22

Expert Comment

by:DarkoLord
ID: 11754175
I don't think there is an easy way to do this...

Darko
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month8 days, 9 hours left to enroll

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question