Solved

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

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

831 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