Tabbed Notepad

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
8 posts Page 1 of 1
Contributors
User avatar
TheSecretBoy
Top Poster
Top Poster
Posts: 195
Joined: Wed Jun 09, 2010 9:39 am

Tabbed Notepad
TheSecretBoy
Hello Guys

This is my first Tutorial hope you learn how to make tabbed notepad
ok lets start

-Create A new Project Name it what you want

-Add 6 Buttons ( New , Remove , Open , Save As... , Font , Color ) And 1 Tabcontrol

it will look like this.
Image

Note : you can use MenuStrip or Toolbar but i choose button .

-Remove Tabpages

Image

And here is the codes !

Dont forget to put Dim A As Integer = 1 or it won't work ( UNDER PUPLIC CLASS FORM )
Code: Select all
Puplic Class Form1  :
Dim A As Integer = 1
------------------------
Add Tab :
Dim RTB As New RichTextBox
TabControl1.TabPages.Add(1, "Page " & A)
TabControl1.SelectTab(A - 1)
RTB.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(RTB)
A = A + 1
------------------------------------------
RemoveTab:
If TabControl1.TabCount = 1 Then
'Do Nothing
Else
TabControl1.TabPages.RemoveAt(TabControl 1.SelectedIndex)
TabControl1.SelectTab(TabControl1.TabPag es.Count - 1)
A = A - 1
End if
----------------------------------------------
Save:
Dim SFD As New SaveFileDialog
SFD.Filter = "Rich Text Files|*.rtf"
SFD.ShowDialog()
FileOpen(1, SFD.FileName, OpenMode.Output)
PrintLine(1, CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).Text)
FileClose(1)
-------------------------------------------------
Open:
Dim OPF As New OpenFileDialog
Dim AllText As String = "", LineOfText As String = ""
OPF.Filter = "All Files|*.*"
OPF.ShowDialog()
Try
FileOpen(1, OPF.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
---------
You Can Use the normal Richtextbox Codes on this like :
Code: Select all
CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).Undo
CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox) = Richtextbox !

Hope you like my first tut !
You do not have the required permissions to view the files attached to this post.
Last edited by TheSecretBoy on Thu Dec 02, 2010 9:00 pm, edited 1 time in total.
Code'N'Stuff
TheSecretBoY
Dont forget to give thanks for those helpful posts cooll;
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: Tabbed Notepad
Axel
actually , this is to easy to make and its not really alot of code lol (alot of friggin comments)
http://vagex.com/?ref=25000
User avatar
iLenkaa
Top Poster
Top Poster
Posts: 170
Joined: Mon Nov 01, 2010 1:17 pm

Re: Tabbed Notepad
iLenkaa
I don't think it's really usefull.
I mean, you have Notepad on your computer. Why would anybody else want to download a less intelligent one? :P
iLenkaa
Image
Image
Image
Image
Image
Image
User avatar
TheSecretBoy
Top Poster
Top Poster
Posts: 195
Joined: Wed Jun 09, 2010 9:39 am

Re: Tabbed Notepad
TheSecretBoy
iLenkaa wrote:
I don't think it's really usefull.
I mean, you have Notepad on your computer. Why would anybody else want to download a less intelligent one? :P
iLenkaa
This is not only used for Notepads idoit;
you can you this for webbrowsers + many programs hehaho;

--------------------------------------------------------------------------------------------------------------------------------------------
Thanks
Code'N'Stuff
TheSecretBoY
Dont forget to give thanks for those helpful posts cooll;
User avatar
iLenkaa
Top Poster
Top Poster
Posts: 170
Joined: Mon Nov 01, 2010 1:17 pm

Re: Tabbed Notepad
iLenkaa
TheSecretBoy wrote:
iLenkaa wrote:
I don't think it's really usefull.
I mean, you have Notepad on your computer. Why would anybody else want to download a less intelligent one? :P
iLenkaa
This is not only used for Notepads idoit;
you can you this for webbrowsers + many programs hehaho;

--------------------------------------------------------------------------------------------------------------------------------------------
Thanks
I didn't say it wasn't good :P lmao;
I like it. :P
But yeah. I just don't think it's very usefull for something...
Image
Image
Image
Image
Image
Image
User avatar
hungryhounduk
VIP - Site Partner
VIP - Site Partner
Posts: 2870
Joined: Mon Jul 27, 2009 11:58 am

Re: Tabbed Notepad
hungryhounduk
I don't think it's really usefull.
I mean, you have Notepad on your computer. Why would anybody else want to download a less intelligent one?
iLenkaa
ILenkaa

You have to Remember that this site is for all People with all Levels of Coding, If it makes you feel good designing and coding an app then YES you should PROUDLY show it off :) It does not matter if its as good or Bad as Windows Notepad, Its the trying and the satisfaction of getting it all right and then posting it up, That is what we like to see on here........Just remember WE all had to start somewhere ;)

Chris
Image
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: Tabbed Notepad
MrAksel
iLenkaa wrote:
I don't think it's really usefull.
I mean, you have Notepad on your computer. Why would anybody else want to download a less intelligent one? :P
iLenkaa
Dude this is a tutorial for people that is new to programming, don't post these friggin disappointing comments. You should be glad he posted it!
You wouldn't be glad if someone said that to you i you thought you had posted a wonderful tutorial!
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
tought5
New Member
New Member
Posts: 19
Joined: Fri Dec 10, 2010 6:50 pm

Re: Tabbed Notepad
tought5
nice tutorial dude :)
8 posts Page 1 of 1
Return to “Tutorials”