System.Windows.Forms.FileDialog.RunDialog Method

Specifies a common dialog box.

Syntax

protected override bool RunDialog (IntPtr hWndOwner)

Parameters

hWndOwner
A value that represents the window handle of the owner window for the common dialog box.

Returns

true if the file could be opened; otherwise, false.

Remarks

This method provides an implementation of CommonDialog.RunDialog(IntPtr), and is invoked when the user of a file dialog invokes CommonDialog.ShowDialog.

In the derived classes System.Windows.Forms.OpenFileDialog and System.Windows.Forms.SaveFileDialog an invalid file name Exception can be raised.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0