Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


HtmlWindow.OpenNew Method

Definition

Displays a file in a new window.

Overloads

OpenNew(String, String)

Displays a file in a new window.

OpenNew(Uri, String)

Displays a file in a new window.

OpenNew(String, String)

Source:
HtmlWindow.cs
Source:
HtmlWindow.cs
Source:
HtmlWindow.cs

Displays a file in a new window.

public System.Windows.Forms.HtmlWindow OpenNew (string urlString, string windowOptions);
public System.Windows.Forms.HtmlWindow? OpenNew (string urlString, string windowOptions);

Parameters

urlString
String

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

windowOptions
String

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

Returns

An HtmlWindow representing the new window.

Remarks

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.

Applies to

.NET Framework 4.8.1 és más verziók
Termék Verziók
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

OpenNew(Uri, String)

Source:
HtmlWindow.cs
Source:
HtmlWindow.cs
Source:
HtmlWindow.cs

Displays a file in a new window.

public System.Windows.Forms.HtmlWindow OpenNew (Uri url, string windowOptions);
public System.Windows.Forms.HtmlWindow? OpenNew (Uri url, string windowOptions);

Parameters

url
Uri

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

windowOptions
String

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

Returns

An HtmlWindow representing the new window.

Remarks

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.

See also

Applies to

.NET Framework 4.8.1 és más verziók
Termék Verziók
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9