Set InitialDirectory for SaveFileDialog : SaveFileDialog « GUI « VB.Net Tutorial





Imports System.Windows.Forms

public class SaveFileDialogWith
   public Shared Sub Main
        Dim SaveFileDialog1 As SaveFileDialog = New System.Windows.Forms.SaveFileDialog

        With SaveFileDialog1
            .DefaultExt = ".txt"
            .Filter = "Text Files|*.txt"
            .InitialDirectory = "C:\My Documents"
        End With

        If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
            Console.WriteLine(SaveFileDialog1.FileName)
        End If
   End Sub
End class










14.62.SaveFileDialog
14.62.1.SaveFileDialog filter and selected file name,SaveFileDialog filter and selected file name,
14.62.2.Set InitialDirectory for SaveFileDialog