Click to return to the Reusing Browser Technology home page    
NavigateComplete2 Event     OnFullScreen Event     WebBrowser Control Events    
Web Workshop  |  Reusing Browser Technology

NewWindow2 Event


Occurs when a new window is to be created for displaying a resource.

Syntax

Private object_NewWindow2 (ByVal ppDisp As Object, ByVal Cancel As Boolean)

Parameters

object
An object expression that evaluates to an object in the Applies To list.
ppDisp
An object expression that, optionally, receives a new, hidden WebBrowser or InternetExplorer object with no URL loaded.
Cancel
A Boolean value that, when set to TRUE, is used to cancel the navigation.

Remarks

Some actions that can cause this include the user shift-clicking on a link, the user right-clicking on a link and choosing "open in new window," or a targeted navigation to a frame name that does not yet exist. Your browser application can also trigger this event by calling the Navigate or Navigate2 method with the navOpenInNewWindow flag. The WebBrowser control has an opportunity to handle the new window creation itself. If it does not, a top-level Internet Explorer window is created as a separate (nonhosted) process.

The application processing this notification can respond in one of three ways:

In Internet Explorer, this event is not fired when Window is selected from the New option on the File menu.

Applies To

InternetExplorer, WebBrowser

See Also

Microsoft Knowledge Base HOWTO: Cause navigation to occur in same Internet Explorer 4.0 Web[axsdk] Non-MSDN link, Microsoft Knowledge Base HOWTO: Use the WebBrowser Control NewWindow2 Event Non-MSDN link, NavigateComplete2



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.