Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-08-08
4
Medium Priority
?
191 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 150 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

916 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