Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "Text files (*.txt)|*.txt|All files (*.*)|*.*"
- Save Button:
- Dim SaveFile As New SaveFileDialog
- SaveFile.FileName = ""
- SaveFile.Filter = "Text Files (*.txt)|*.txt"
- SaveFile.Title = "Save"
- SaveFile.ShowDialog()
- Try
- Dim Write As New System.IO.StreamWriter(SaveFile.FileName)
- Write.Write(RichTextBox1.Text)
- Write.Close()
- Catch ex As Exception
- End Try
- Open Button:
- Dim OpenFile As New OpenFileDialog
- OpenFile.FileName = ""
- OpenFile.Filter = "Text Files (*.txt)|*.txt"
- OpenFile.Title = "Open"
- OpenFile.ShowDialog()
- Try
- Dim Read As New System.IO.StreamReader(OpenFile.FileName)
- RichTextBox1.Text = Read.ReadToEnd
- Read.Close()
- Catch ex As Exception
- End Try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement