Any web page can display pop-up windows using window.open() JavaScript function. For example:


window.open("http://www.google.com", 
    "_blank", 
    "toolbar=yes, scrollbars=yes, resizable=yes, top=500, left=500, width=400, height=400");


DotNetBrowser API provides PopupHandler class to customize handling pop-up windows creation. To customize popup-windows you must register your own implementation of PopupHandler depending on GUI Toolkit you use in your .NET application. Refer to:



Disable Popups


By default popup windows are enabled for both BrowserView implementations. To disable popup windows you must create your own implementation of PopupHandler and return null from the HandlePopup() method as shown below:

C#

public class SamplePopupHandler : PopupHandler
{
    public PopupContainer HandlePopup(PopupParams popupParams)
    {
        return null;
    }
}

VB.NET

Public Class SamplePopupHandler
    Implements PopupHandler
    Public Function HandlePopup(popupParams As PopupParams) As PopupContainer Implements PopupHandler.HandlePopup
        Return Nothing
    End Function
End Class


Usage:

C#

browser.PopupHandler = new SamplePopupHandler();

VB.NET

browser.PopupHandler = New SamplePopupHandler()