Open File Dialog Box (OpenFileDialog)1. The OpenFileDialog control has the following basic attributes:InitialDirectoryInitial directory of the dialog box
FilterFile filter to be displayed in the dialog box, for example, "text file (*. txt) | *. txt | all files (*. *) | *.*"
FilterIndexThe index of the file filter selected in the dialog box. If the first item is selected, it is set to 1.
RestoreDirectoryWhether to restore the current directory before closing the control dialog box
FileNameThe first file displayed in the dialog box or the last selected file
TitleCharacters displayed in the title bar of the dialog box
AddExtensionWhether to automatically add the default Extension
CheckPathExistsCheck whether the specified path exists before returning in the dialog box.
DefaultExtDefault Extension
DereferenceLinksWhether to cancel the reference shortcut before returning from the dialog box
ShowHelpEnable the "help" button
ValiDateNamesThe control dialog box checks whether invalid characters or sequences are not included in the file name.
2. The OpenFileDialog control has the following common events:FileOkThe event to be processed when you click "open" or "save ".
HelpRequestEvent to be processed when the user clicks the "help" button
Save file dialog box (SaveFileDialog)The control of the Save file dialog box can be saved in two situations: save, save as, and save as easily. When the file is opened, write an article about the file, here we mainly talk about saving as (SaveAs ).
1. properties of the SaveFileDialog ControlFilterFile filter to be displayed in the dialog box, for example, "text file (*. txt) | *. txt | all files (*. *) | *.*"
FilterIndexThe index of the file filter selected in the dialog box. If the first item is selected, it is set to 1.
RestoreDirectoryWhether to restore the current directory before closing the control dialog box
AddExtensionWhether to automatically add the default Extension
CheckFileExists CheckPathExistsCheck whether the specified path exists before returning in the dialog box.
ContainerDetermines whether a user is prompted when a file is to be created. This parameter is applicable only when ValidateNames is a true value.
DefaultExtDefault Extension
DereferenceLinksWhether to cancel the reference shortcut before returning from the dialog box
FileNameThe first file displayed in the dialog box or the last selected file
InitialDirectorInitial directory of the dialog box
OverwritePromptControl whether to prompt the user when the current file is to be rewritten.
ValidateNamesApplicable only when the value is true.
ShowHelpEnable the "help" button
TitleCharacters displayed in the title bar of the dialog box
ValidateNamesThe control dialog box checks whether invalid characters or sequences are not included in the file name.
2. The SaveFileDialog event is as follows:FileOkThe event to be processed when you click "open" or "save ".
HelpRequestEvent to be processed when the user clicks the "help" button
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.