❗ *Tut* How To Make A Simple Notepad

Posts 1–3 of 3 · Page 1 of 1
❗ *Tut* How To Make A Simple Notepad
This tut is on how to make a simple notepad in vb8
keep patient because i will release tut on how to make a advanced notepad!.

Lets start:

First you will need :
menu strip
Rich text box

thats about all :L

First click on the menu strup and type
file
then under file type new
open
save
then next to file type edit
under edit type:
undo
redo
now next to edit type format
under format type:
font
colour

now you should have some thing looking like this:




now for the code (i bet you liek wow :L)

New:
RichTextBox1.Clear()

Open:
Try
Dim dlg As OpenFileDialog = New OpenFileDialog
dlg.Title = "Open"
dlg.Filter = "Rich Text Files (*.rtf)|*.rtf"
If dlg.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
RichTextBox1.LoadFile(dlg.FileName)
End If
Catch ex As Exception : End Try

Save:
Try
Dim dlg As SaveFileDialog = New SaveFileDialog
dlg.Title = "Save"
dlg.Filter = "Rich Text Files (*.rtf)|*.rtf"
If dlg.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
RichTextBox1.SaveFile(dlg.FileName, RichTextBoxStreamType.RichText)
End If
Catch ex As Exception : End Try

Undo:
RichTextBox1.Undo()

Redo:
RichTextBox1.Redo()

Cut:
RichTextBox1.Cut()

Copy:
RichTextBox1.Copy()

Paste:
RichTextBox1.Paste()

Clear:
RichTextBox1.Clear()

Select All:
RichTextBox1.SelectAll()

font:
Try
Dim dlg As FontDialog = New FontDialog
dlg.Font = RichTextBox1.Font
If dlg.ShowDialog = System.Windows.Forms.DialogResult.OK Then
RichTextBox1.Font = dlg.Font
End If
Catch ex As Exception : End Try

Colour:
Try
Dim dlg As ColorDialog = New ColorDialog
dlg.Color = RichTextBox1.ForeColor
If dlg.ShowDialog = System.Windows.Forms.DialogResult.OK Then
RichTextBox1.ForeColor = dlg.Color
End If
Catch ex As Exception : End Try

*NOTE*
I made this tut on my site...so im not trying to take credit(and is this leeching?)

please please thank me if this worked becuase it took alot of time
where is the copy, paste and cut things (not metioned before)
The Code he means xD
Posts 1–3 of 3 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us