How to Create a Notepad in VS C#

by SafeerAhmedAbro in Circuits > Microsoft

34168 Views, 19 Favorites, 0 Comments

How to Create a Notepad in VS C#

not.png

Hi, today i will teach you how to create a cool notepad in visual studio c# for beginners. In this tutorial i am going to use visual studio express 2010. You can create it in the same way in VS 2012 or 2013.

Requirements:-

1.Computer

2.Visual Studio

3.Creativity

NOTE:- no need of programming skills etc...

First Create New Project (windows Forms Application)

vs.jpg
new.jpg
note.jpg

Open VS 2010 etc... and then create a new project of visual c# (windows forms application). Name your project , here i am naming just Notepad but you can name it something more cool.

Design Your Form1

form.jpg
label.jpg
textox.jpg

Now its time to design your Form1, which will appear right after you click "ok" when naming your application.

You have to insert 2 buttons , 1 Label and 1 textBox.

How to insert:-

while you form is in front of you , there will be a tool box on the left side of the screen.

Search the toolbox by scrolling, & find tools named Button, Label, TextBox.

Drag them on your form and then they will be automatically added to you form.

OR

Left-Click on that tool and then move your cursor to your form and then Left-click again to add that particular tool.

Arranging the Items

fomromor.jpg
bbb.jpg
aaa.jpg
goog.jpg

Now you just have to arrange the items in the way you like. Here i am putting the label in the center of the form and making a form larger and putting each button beside that label and making the textbox bigger and putting in below the label & i am also changing the names of the buttons/label except the textbox. As you need to make your notepad Cool so to make it cool add images on buttons rather than text.

I am also changing the properties and here they are:-

For:-

Label = font size is 70

Button 1 & 2 = Text = null, Size = 64, 64, Image = (you can download and insert any image you like)

Text Box = Size = 674, 515 , font size = 30

Form1 = Startposition = center screen, form border style = None , Form size = 698, 646

NOTE:- the properties box is on the right side of the Visual Studio.

Adding Extra Stuff

dialgue.jpg

Now i will add a "SaveFileDialogue" "FontDialgue" & one more button.

Add the FontDialogue in the same way like i added the SaveFileDialogue.

Now change the image or text of that extra button.

It will close the application.

Coding

button1.png
button2.png
no.jpg
usinf system.jpg

Now time to code.

The Coding Of each button is in described in images.

If you get error in writing the "File.WriteAllText" sort of code, then click on the file (text)

and then choose (Using.System.I.O).

you can see in the images.

Time to Publish

setting.jpg
mine.jpg
publish.jpg
your app.jpg

Now for publishing , go to the properties of the project ! not form1 !

and then choose the settings you like and hit the publish button.

(Further explained in images)

Done

you have created your cool notepad !