Visual Basic: SaveFileDialog Example

Platform:Visual Basic
Task:SaveFileDialog Example
Discussion:
SaveFileDialog Example
Example:
Dim Ofd As New SaveFileDialog
        Ofd.Filter = "SQL insert query files |*.sql"
        If Ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
            Dim objWriter As New System.IO.StreamWriter(Ofd.FileName)
            objWriter.WriteLine("TEST")
            objWriter.WriteLine("TEST2")
            objWriter.Close()
        End If
Back to Index