Desing
Running
You will need the following:
*1 Rich Text Box
* 1 Menu Strip
* 1 Save Dialog
Program Codes :
Public Class Form1
Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
Try
PictureBox1.Visible = True
Dim dlg As SaveFileDialog = New SaveFileDialog
dlg.Title = "Save Batch File"
dlg.Filter = "Batch File (*.bat)|*.bat"
If dlg.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
RichTextBox1.SaveFile(dlg.FileName, RichTextBoxStreamType.PlainText)
End If
Catch ex As Exception : End Try
PictureBox1.Visible = False
End Sub
Private Sub NewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewToolStripMenuItem.Click
RichTextBox1.Clear()
End Sub
Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
MsgBox("Batch File Maker Created By Roatan Softwares")
End Sub
Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
Try
PictureBox1.Visible = True
Dim dlg As SaveFileDialog = New SaveFileDialog
dlg.Title = "Save Batch File"
dlg.Filter = "Batch File (*.bat)|*.bat"
If dlg.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
RichTextBox1.SaveFile(dlg.FileName, RichTextBoxStreamType.PlainText)
End If
Catch ex As Exception : End Try
PictureBox1.Visible = False
End Sub
Private Sub NewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewToolStripMenuItem.Click
RichTextBox1.Clear()
End Sub
Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
MsgBox("Batch File Maker Created By Roatan Softwares")
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
Me.Close()
End Sub
Private Sub GreenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GreenToolStripMenuItem.Click
RichTextBox1.BackColor = Color.Black
RichTextBox1.ForeColor = Color.Lime
End Sub
Private Sub RedToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RedToolStripMenuItem.Click
RichTextBox1.BackColor = Color.Black
RichTextBox1.ForeColor = Color.Red
End Sub
Private Sub WhiteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WhiteToolStripMenuItem.Click
RichTextBox1.BackColor = Color.Black
RichTextBox1.ForeColor = Color.White
End Sub
Private Sub BlackToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BlackToolStripMenuItem.Click
RichTextBox1.BackColor = Color.White
RichTextBox1.ForeColor = Color.Black
End Sub
Private Sub BlueToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BlueToolStripMenuItem.Click
RichTextBox1.BackColor = Color.White
RichTextBox1.ForeColor = Color.Blue
End Sub
Private Sub GreenToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GreenToolStripMenuItem1.Click
RichTextBox1.BackColor = Color.White
RichTextBox1.ForeColor = Color.Lime
End Sub
Private Sub SilverToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SilverToolStripMenuItem.Click
RichTextBox1.BackColor = Color.Blue
RichTextBox1.ForeColor = Color.Silver
End Sub
Private Sub RedToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RedToolStripMenuItem1.Click
RichTextBox1.BackColor = Color.Blue
RichTextBox1.ForeColor = Color.Red
End Sub
Private Sub GreenToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GreenToolStripMenuItem2.Click
RichTextBox1.BackColor = Color.Blue
RichTextBox1.ForeColor = Color.Lime
End Sub
Private Sub CheckForUpdatesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckForUpdatesToolStripMenuItem.Click
MsgBox("You Have The Lastest Version")
End Sub
End Class
No comments:
Post a Comment