Heres the story...
I am making a notepad thing, and I have come to saving the text into a text file.
It works... Sort of. I can get up the SaveDialog, but whatever I type, the saved filename will just be "1". However, I renamed the file, and the text was written fine. But something is wrong with saving the file.
I dont know...
Here is the save code:
I guess I am doing something totally wrong.VB Code:
Dim fname As String fname = "" SaveFileDialog1.Filter = "Rich text documents |*.rtf" fname = SaveFileDialog1.ShowDialog() Dim text As String text = RichTextBox1.Text FileOpen(1, fname, OpenMode.Append, OpenAccess.Write, OpenShare.Shared) Print(1, Me.RichTextBox1.Text) FileClose(1)




Reply With Quote