Home All Groups Group Topic Archive Search About

Saving stream message in Save As dialog

Author
29 Mar 2005 6:31 PM
Joseph
I am trying to open up Save As dialog to save dynamically generated message
on the fly.  Clients will specify path and type file name.  Thanks.

Author
29 Mar 2005 7:10 PM
Herfried K. Wagner [MVP]
"Joseph" <Jos***@discussions.microsoft.com> schrieb:
>I am trying to open up Save As dialog to save dynamically generated message
> on the fly.  Clients will specify path and type file name.

\\\
Dim sfdlg As New SaveFileDialog()
If sfdlg.ShowDialog() = DialogResult.OK Then
    Dim sw As New StreamWriter(sfdlg.FileName)
    sw.WriteLine("Hello World")
    sw.Close()
End If
sfdlg.Dispose()
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>