NamespaceWindows.Forms CreatableYes DescriptionThe SaveFileDialog class represents a common dialog box for selecting or saving a file. The SaveFileDialog class has properties that let you configure, display, and retrieve the results from this dialog box, from which the user selects a single file. The dialog does not create or update the file; it only indicates the file to be modified. The following list discusses the more interesting members of the SaveFileDialog class.
ExampleThe following code prompts the user for a filename to save. Dim selectFile As New SaveFileDialog selectFile.OverwritePrompt = True If (selectFile.ShowDialog( ) = DialogResult.OK) Then Console.WriteLine(selectFile.FileName) End If Version DifferencesThe public interfaces used for this SaveFileDialog class and the related VB 6 CommonDialog control are quite different. See AlsoOpenFileDialog Class |