OpenFileDialog Members

Represents a common dialog box that allows a user to specify a filename for one or more files to open. This class cannot be inherited.

The following tables list the members exposed by the OpenFileDialog type.

  Name Description
Public method OpenFileDialog Initializes a new instance of the OpenFileDialog class.
Top

  Name Description
Public property AddExtension  Gets or sets a value indicating whether a file dialog automatically adds an extension to a filename if the user omits an extension.(inherited from FileDialog)
Public property CheckFileExists  Gets or sets a value indicating whether a file dialog displays a warning if the user specifies a filename that does not exist.(inherited from FileDialog)
Public property CheckPathExists  Gets or sets a value that specifies whether warnings are displayed if the user types invalid paths and filenames.(inherited from FileDialog)
Public property DefaultExt  Gets or sets a value that specifies the default extension string to use to filter the list of files that are displayed.(inherited from FileDialog)
Public property DereferenceLinks  Gets or sets a value indicating whether a file dialog returns either the location of the file referenced by a shortcut or the location of the shortcut file (.lnk).(inherited from FileDialog)
Public property FileName  Gets or sets a string containing the full path of the file selected in a file dialog.(inherited from FileDialog)
Public property FileNames  Gets an array that contains one filename for each selected file.(inherited from FileDialog)
Public property Filter  Gets or sets the current filename filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box at the bottom of a file dialog.(inherited from FileDialog)
Public property FilterIndex  Gets or sets the index of the filter currently selected in a file dialog.(inherited from FileDialog)
Public property InitialDirectory  Gets or sets the initial directory that is displayed by a file dialog.(inherited from FileDialog)
Public property Multiselect Gets or sets an option indicating whether OpenFileDialog allows users to select multiple files.
Public property ReadOnlyChecked Gets or sets a value indicating whether the read-only check box displayed by OpenFileDialog is selected.
Public property RestoreDirectory  Gets or sets a value that causes a file dialog to restore its current directory to the original value before a user changes directory to search for files.(inherited from FileDialog)
Public property SafeFileName  Gets a string that only contains the filename for the selected file.(inherited from FileDialog)
Public property SafeFileNames  Gets an array that contains one safe file name for each selected file.(inherited from FileDialog)
Public property ShowReadOnly Gets or sets a value indicating whether OpenFileDialog contains a read-only check box.
Public property Tag  Gets or sets an object associated with the dialog. This provides the ability to attach an arbitrary object to the dialog.(inherited from CommonDialog)
Public property Title  Gets or sets the text that appears in the title bar of a file dialog.(inherited from FileDialog)
Public property ValidateNames  Gets or sets a value indicating whether the dialog accepts only valid Win32 filenames.(inherited from FileDialog)
Top

(see also Protected Methods )
  Name Description
Public method Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method GetType  Gets the Type of the current instance. (inherited from Object)
Public method OpenFile Opens a read-only stream for the file that is selected by the user using OpenFileDialog.
Public method OpenFiles Creates an array that contains one read-only stream for each file selected by the user using OpenFileDialog.
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method Reset Overridden. Resets all OpenFileDialog properties to their default values.
Public method ShowDialog  Overloaded. Displays a common dialog. (inherited from CommonDialog)
Public method ToString  Returns a string that represents a file dialog. (inherited from FileDialog)
Top

  Name Description
Protected method Finalize  Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Protected method MemberwiseClone  Creates a shallow copy of the current Object. (inherited from Object)
Top

  Name Description
Public event FileOk  Occurs when the user selects a filename by either clicking the Open button of the OpenFileDialog or the Save button of the SaveFileDialog.(inherited from FileDialog)
Top

Community Additions

ADD
Show: