Solved

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

Posted on 2004-08-08
4
170 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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

790 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