Save File Dialog Properties in VB.NET
How to use the Save File Dialog Properties in VB.NET?
Explanation
Save File Dialog Properties
Following table lists the
save file dialog Properties, Methods, Events used commonly with the SaveFileDialog Control in Visual Basic.net 2008.
Properties:
Properties |
Description |
AddExtension |
Property gets or sets if the dialog box adds an extension to filenames if the extension is not added. |
CheckFileExists |
Property gets or sets a dialog box to display a warning if an nonexistent file is referenced. |
CheckPathExists |
Property gets or sets a dialog box to display a warning if an nonexistent file path is referenced. |
DefaultExt |
Property used to get or set the default file extension. |
FileName |
Property used to get or set filename selected in the file dialog box. |
FileNames |
Property used to get filenames of the selected files. |
Filter |
Property to used to get or set the current filename filter string which sets the choices that appear in 'Save as file type'
or 'Files of type' box. |
FilterIndex |
Property to used to set or get the index of the filter set in the file dialog box. |
InitialDirectory |
Property used to set or get initial directory used in the file dialog box. |
OverwritePrompt |
Property used to set or get whether dialog box to display a warning if the name specified already exists. |
RestoreDirectory |
Property used to set or get whether the dialog box should restore the origional directory before closing. |
ValidateNames |
Property used to set or get a value specifying that the dialog box accepts only valid file names. |
Methods:
Method |
Description |
OpenFile |
Method used to open the file selected by the user with read only permission. |
Reset |
Method resets all the options to their default values. |
ShowDialog |
Method used to show the dialog box. |
Events:
Events |
Description |
FileOk |
Triggers when the user clicks the Open or Save button. |
HelpRequest |
Triggered when the user clicks the Help Button. |
Thus you can use the properties of save file dialog in an effective way.