I have a multi-lined text box that users can save as a text file. Here is the code that I have:
VB Code:
Private Sub mnuSaveAs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSaveAs.Click SaveFileDialog.Filter = "Text files (*.txt)|*.txt" SaveFileDialog.ShowDialog() If SaveFileDialog.FileName <> "" Then FileOpen(1, SaveFileDialog.FileName, OpenMode.Output) PrintLine(1, txtReport.Text) 'copy text to disk FileClose(1) End If End Sub
Obviously it writes everything to a single line of text in the file. What is the easiest way around this so that it saves the the txt file the same way it appears on screen?
Thanks,
Jim




Reply With Quote