Introduction: How to Create a Notepad in VS C#
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...
Step 1: First Create New Project (windows Forms Application)
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.
Step 2: Design Your Form1
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.
Step 3: Arranging the Items
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.
Step 4: Adding Extra Stuff
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.
Step 5: Coding
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.
Step 6: Time to Publish
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)
Step 7: Done
you have created your cool notepad !
5 Comments
8 years ago on Introduction
Thank you instructables! it was really useful... :)
Reply 7 years ago
really its useful, ParmisM ji
7 years ago
Thanks for providing such a great start. I ended up creating a pretty complete notepad clone. You can see for yourself at:
http://www.simplygoodcode.com/2012/04/notepad-clon...
Attached is what it looks like as well as a list of the features it includes:
9 years ago on Introduction
Very nice beginner tutorial, which is super important for noobs like myself. Welcome to instructables!
Reply 9 years ago on Introduction
Thanks ! :)