Save:
SaveFileDialog1.Filter = "txt (*.txt)|*.text"
SaveFileDialog1.ShowDialog()
If SaveFileDialog1.FileName <> "" Then
FileOpen(1, SaveFileDialog1.FileName, OpenMode.Output)
PrintLine(1, Document.Text)
FileClose(1)
End If
Open:
Dim AllText As String = "", LineOfText As String = ""
OpenFileDialog1.Filter = "txt (*.txt)|*.txt"
OpenFileDialog1.ShowDialog()
If OpenFileDialog1.FileName <> "" Then
Try
FileOpen(1, OpenFileDialog1.FileName, OpenMode.Input)
Do Until EOF(1)
LineOfText = LineInput(1)
AllText = AllText & LineOfText & vbCrLf
Loop
Document.Text = AllText
Catch
Finally
FileClose(1)
End Try
End If
The code is really basic. I have one SaveFileDialoug and one OpenFileDialouge. Everytime I try to save my document it only saves one box. How can I make it save all boxes? Do I need file type other than .txt, or is that sufficiant. Do I need more dialouges? Any help would be appriciated. If you need any more information just ask.
Edited by WingedPanther, 10 November 2008 - 02:28 PM.
add code tags


Sign In
Create Account


Back to top









