Notepad Tutorial in Visual Basic .NET

Tags: VB.NET, VB 2008, VB 2010, VB 2012, VB 2013

Page 1

Source code for this tutorial is available at the end of Page 4 of this tutorial

Page: 1 2 3 4

This tutorial will show you how to make a notepad in visual basic .net.

Open Visual Basic Express Edition.
Click on Project next to Create:

Visual Basic 2008 Notepad

Click on Windows Form Application, and name the project "Your name Application" and then click Ok.

Visual Basic 2008 Notepad

You can change the form text to "your name's notepad". Click on the form and then go to properties window, then change the text property.

Add a textbox from the Control box, and change it's property to multi line. To change the property click on the text box, and then click on the little arrow on the top right of the text box. You will see a new box, check MuliLine.

Visual Basic 2008 Notepad

Once you check MultiLine, you will be able to resize the textbox, and therefore change the textbox size to fit the form from the left, right and bottom like this:

Visual Basic 2010 Notepad

Change the text box anchor property to Top, Bottom, Left, Right. To do so, click on the text box, go to properties window, change the anchor property:

Visual Basic 2013 Notepad

Click on the boxes that appear in gray as the image above.

This property will make the text box resize as the form resizes. For example, if the user want to maximize the form, the text box's size will also maximizes.

Add a MenuStrip from the control box, and place on top of the form between the form's control box, and the textbox.

Visual Basic 2008 Menu

Add File, Edit, Format, Help to the MenuStrip as follows:

Visual Basic 2010 Notepad Menu

Under File add New, Open, Save, and Exit as follows:

Note: for printing and print preview please click here

Visual Basic 2008 Notepad Menu

Under Edit add Undo, Cut, Copy, Paste, Select All and Find

Visual Basic 2008 Notepad Menu

Notice that we didn't add Redo because textbox control doesn't support it.

Under Format add Font, Text Color, Text Alignment, and Back Color.

Visual Basic 2008 Notepad Menu

Under Help add About

Visual Basic 2008 Notepad Menu

Page: 1 2 3 4

Share This

Home | About | Contact | Privacy Policy

Copyright 2017 - All Rights Reserved.