Design
Menu File Options
Menu Edit Option
Menu Help Option
You will need the following:
* 1 Richtextbox
* 1 DropdownMenuStrip with the following;
File (New, Save, Exit) Edit(Font, Color) Help(Help)
Program Codes :
Imports System.IO
Public Class Form1
Private Sub ExitToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem1.Click
End
End Sub
Private Sub NewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewToolStripMenuItem.Click
RichTextBox1.Text = ""
End Sub
Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim myStream As New StreamWriter(SaveFileDialog1.FileName, True)
myStream.Write(RichTextBox1.Text)
myStream.Close()
End If
End Sub
Private Sub SaveFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles SaveFileDialog1.FileOk
End Sub
Private Sub AboutToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem1.Click
MsgBox("Made by VB2008Tutorialz")
End Sub
Private Sub FontToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontToolStripMenuItem.Click
FontDialog1.Font = RichTextBox1.Font
FontDialog1.ShowDialog()
RichTextBox1.Font = FontDialog1.Font
End Sub
Private Sub ColorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ColorToolStripMenuItem.Click
ColorDialog1.ShowDialog()
If ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
RichTextBox1.SelectionColor = ColorDialog1.Color
End If
End Sub
Private Sub LeftToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
End Class
Project Source Download
No comments:
Post a Comment