Monday, June 15, 2009

OpenFileDialog

Prompts the user to open a file. This class cannot be inherited
This class allows you to check whether a file exists and to open it. The show read only property determines whether a read-only check box appears in the dialog box. The ReadOnlyChecked property indicates whether the read-only check box is checked.
Most of the functionality for this class is found in the FileDialog class.
If you want to give the user the ability to select a folder instead of a file, use FolderBrowserDialog instead. The following code example creates an OpenFileDialog, sets several properties, and displays the dialog box using the CommonDialog..::.ShowDialog method. The example requires a form with a Button placed on it and the System.IO namespace added to it.

No comments:

Post a Comment