Export (0) Print
Expand All

HtmlWindow.OpenNew Method (Uri, String)

Displays a file in a new window.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public HtmlWindow OpenNew(
	Uri url,
	string windowOptions


Type: System.Uri

The Uniform Resource Locator that describes the location of the file to load.

Type: System.String

A comma-delimited string consisting of zero or more of the following options in the form name=value. See Open for a full description of the valid options.

Return Value

Type: System.Windows.Forms.HtmlWindow
An HtmlWindow representing the new window.

If the file referenced by url is an HTML file, text file, or other file type that can be hosted inside of Internet Explorer, it will be displayed in a new window. If the file cannot be displayed inside of Internet Explorer, then the window will open only long enough for Internet Explorer to download the resource; it will close immediately afterwards.

When you create new windows using Open or OpenNew, it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call Close on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit.

If you want to load a document into a previously opened window, see the Open method.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft