Visual Basic Making NotePad

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,198
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 24, 2009

Made By runup4fever1

Code is ::::

Public Class Form1
Dim i As Integer = 1
---------
AddTab:
Dim Edit As New RichTextBox
TabControl1.TabPages.Add(1, "Page " & i)
TabControl1.SelectTab(i - 1)
Edit.Name = "TE"
Edit.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Edi t)
i = i + 1
---------
RemoveTab:
If TabControl1.TabCount = 1 Then

Else
TabControl1.TabPages.RemoveAt(TabControl 1.SelectedIndex)
TabControl1.SelectTab(TabControl1.TabPag es.Count - 1)
i = i - 1
---------
Save:
Dim SaveFileDialog1 As New SaveFileDialog
SaveFileDialog1.Filter = "Rich Text Files|*.rtf"
SaveFileDialog1.ShowDialog()
FileOpen(1, SaveFileDialog1.FileName, OpenMode.Output)
PrintLine(1, CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).Text)
FileClose(1)
---------
Open:
Dim OpenFileDialog1 As New OpenFileDialog
Dim AllText As String = "", LineOfText As String = ""
OpenFileDialog1.Filter = "All Files|*.*"
OpenFileDialog1.ShowDialog()
Try
FileOpen(1, OpenFileDialog1.FileName, OpenMode.Input)
Do Until EOF(1)
LineOfText = LineInput(1)
AllText = AllText & LineOfText & vbCrLf
Loop
CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).Text = AllText
Catch

Finally
FileClose(1)
End Try
---------
Font:
Dim FS As New FontDialog
FS.ShowDialog()
CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).Font = FS.Font
---------
Colour:
Dim FC As New ColorDialog
FC.ShowDialog()
CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).ForeColor = FC.Color
---------
Clear All:
CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).Text = ""

Category:

Entertainment

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Top Comments

  • Awesome video, but if you want the form to be resisize-able, you can add a panel and put every button in there and dock the panel to the top.

    And then dock the tabcontrol in the middle.

    Thanks :))

  • Continue making Visual Basic Videos!!!

    Keep it up!

see all

All Comments (9)

Sign In or Sign Up now to post a comment!
  • This song brings back memories xD

  • Thanks, I was expierencing troubles when I wanted to use tabs for richtextbox. This code helped me on my way.

    Maybe you should alter some codes to something simpler like

    Clear All:

    CType(TabControl1.SelectedTab.­Controls.Item(0), RichTextBox).clear()

    (Instead of .text=""

    Thanks again ;)

  • Can you upload this to mediafire and send me the link for this?

  • thanks for code runup4fever1

    like + subscribe

  • Also subscribed!

  • I wanted to be your first "supporter".

    Kuz I don't have much comments either.

    I rate 5 starts for you.

  • Good Video!!! I'll be the first to comment that you did a good job!!!!

    -You included source code

    -Summarized w/ alot of details

    -Restored meaning to the word "tutorial video"

    - Helped me alot!!!!

    Thanks so much.

    Bless you!!!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more