Results 1 to 3 of 3

Thread: [02/03] SaveDialog

  1. #1

    Thread Starter
    Hyperactive Member FireKnox101's Avatar
    Join Date
    Aug 2005

    Exclamation [02/03] SaveDialog

    is there any examples of how to use the savedialog, to save any thing like,
    text, pictures, other files.

    Im using 2003

    Im currently using: VB.NET 2003, And VB 2005 Express
    My Projects
    Form Them Show Keypress In App
    Simple Ping Control

  2. #2
    "The" RedHeadedLefty
    Join Date
    Aug 2005
    College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation

    Re: [02/03] SaveDialog

    Save dialog is just like the open file dialog. All it does is let the user browse to the directory they want to save in, and you can retrieve the file path after it is chosen. The "save" method would be implemented yourself, and it would depend on whatever type of file you are saving. For text files, StreamWriter can write those kinds of files. For pictures, there are methods like Image.Save, BMP.Save, etc etc...

    Searching for "SaveFileDialog" in the search function will pull several examples...

  3. #3
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Lansing, MI; USA

    Re: [02/03] SaveDialog

    VB Code:
    1. Dim SFD As New SaveFileDialog
    2. With SFD
    3.   .Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*)
    4.   .Title = "Save File"
    5.   .DefaultExt = ".txt"
    6.   .FileName = Environment.GetFolderPath(Environment.SpecialFolder.Personal) & Path.DirectorySeparatorChar
    7.   If .ShowDialog <> DialogResult.Cancel Then
    8.     Dim SW As New StreamWriter(.FileName)
    9.       'Make the text file here
    10.     SW.Close()
    11.   End If
    12. End With

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width