SaveFileDialog filter and selected file name, : SaveFileDialog « GUI « VB.Net Tutorial






SaveFileDialog filter and selected file name,
Imports System.Windows.Forms

public class FileOpenDialogFilter
   public Shared Sub Main
        Dim saveFileDialog1 As System.Windows.Forms.SaveFileDialog

        saveFileDialog1 = New System.Windows.Forms.SaveFileDialog()

        saveFileDialog1.CreatePrompt = True
        saveFileDialog1.FileName = "doc1"

        saveFileDialog1.Filter = "Word (*.doc) |*.doc;*.rtf|(*.txt) |*.txt|(*.*) |*.*"
        If saveFileDialog1.ShowDialog() = 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