|
Public Class Form1 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click SaveFileDialog1.ShowDialog() RichTextBox1.SaveFile(SaveFileDialog1.FileName) MsgBox("THIS FILE SAVE SUCCESSFUL.") End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click OpenFileDialog1.ShowDialog() RichTextBox1.LoadFile(OpenFileDialog1.FileName) End Sub Private Sub OPENToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OPENToolStripMenuItem.Click OpenFileDialog1.ShowDialog() RichTextBox1.LoadFile(OpenFileDialog1.FileName) End Sub Private Sub SAVEToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SAVEToolStripMenuItem.Click SaveFileDialog1.ShowDialog() RichTextBox1.SaveFile(SaveFileDialog1.FileName) MsgBox("THIS FILE SAVE SUCCESSFUL.") End Sub Private Sub NEWFILEToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NEWFILEToolStripMenuItem1.Click RichTextBox1.Clear() TextBox1.Clear() End Sub Private Sub EXITToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EXITToolStripMenuItem.Click End End Sub End Class |