This guide wont teach you to code some awesome notepad but just a simple one..Im going to try to keep the code as simple as possible.

Aite, your gonna need to open a new C# project by opening Microsoft Visual C#, then goto 

Name the project Notepad or whatever you want.

Add the following items. (Menu Strip, openFileDialog, saveFileDialog, Text Box)

Posted Image

Now set the textBox’s dock to fill, then rename it to txtMain.

Posted Image

Then click one time on your textBox, you should see a small play arrow, click it and check “Multiline”. 

Posted Image

You should now have something that looks like this.

Posted Image

Now right click on a blank part of the menu strip, and press “Insert Standard Items”

Posted Image

You should have a bunch of basic functions by now, but its not that easy =P, they all dont have code. 

But start off by deleting “Tools” and “Help”. 

Now in your form editor click on the “File” button, then double click on “New”, which should bring you to the code editor, then write the code

Then goto “Open”‘s code, and add this code

Now proceed to “Save”‘s code, and add this code

Then for “Save as”‘s code, add

“Print”‘s code is

“Print Preview” is

“Exit”‘s code is

Move on to “Undo”‘s code, add

For “Redo”‘s code its

Add this to “Cut”‘s code

For “Copy” add

“Paste”‘s code is

For “Select All” its

Ur done with most of the code, but our Notepad still lacks one function – Word Wrap!!

Quote from Xav:

Xav said:
I disagree with the last bit (the word wrap). It would be much better to use a single checked box to wrap text.

To achieve this, set the menu item’s Checkonclick boolean property to True, and then use the following code in the Click event:

Well thats it =)

Posted Image

Hope you enjoyed this guide. If you need anymore screenies tell me lol, i’ll add em

What Do You Think on This ? Say Here

This site uses Akismet to reduce spam. Learn how your comment data is processed.