I am writing a program that should allow the user to press a browse button to browse their directory and save a text file with the form information they wrote in.
Can someone give me a website or a link to see how this is done!
Thank you!
I am writing a program that should allow the user to press a browse button to browse their directory and save a text file with the form information they wrote in.
Can someone give me a website or a link to see how this is done!
Thank you!
Here is a chunk of "Save As" code from a menu in one of my apps
Private Sub mnuSaveAs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSaveAs.Click
'prompt for a file name and save the current library to that file
dlgSave.Filter = "Book Library Files|*.bkl|All Files|*.*"
dlgSave.DefaultExt = "bkl"
If dlgSave.ShowDialog() = DialogResult.OK Then
SaveBookList(dlgSave.FileName)
Library = dlgSave.FileName
End If
End Sub
dlgSave is a System.Windows.Forms.SaveFileDialog and the name of the file to be saved into is returned in the FileName property. The Filter property restricts the file list to files with the given extensions.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.