Wednesday, August 31, 2011

Text editor - Visual basic

Today, let's see the making of our first system software - text editor. We will create it using Visual basic language and Visual Studio IDE. Incase, you don't have Visual Studio, download a free version of Visual Studio or Visual basic express from the below link

I have made it using Visual Studio 2010, so it may be compatible with 2008 edition, but before that I cannot guarantee. Below is the download link for my project. If you know Visual Basic, it's very easy and intuitive to understand the commands and if you have any doubts, please post them as comments

It does all the things that a notepad does, along with good exception handling. The only change is that, it uses " Rich text " files, instead of traditional notepad files. And one more thing, it's name is Dileepad

I have tried to implement spell checker functionality in it, by using "Keyoti Rapid spell Desktop", but it's a paid version and since the version expired, I have to remove the functionality. It's just a single one line in Form_Load, that makes the rich tex box we are using, to gain the spell checker functionality. Try to do it, if you couldn't comment, I will help you. The Dileepad looks as the one shown below

Click to enlarge

If you know Visual basic, skip the remaining post.

If you don't know Visual Basic, don't bother yourself, it's one of the easiest languages to learn and with .net frame work, it has become more subtle. Just go through the code and try to understand it. If you got doubts, clarify them by going through the msdn blog. It has hundreds of articles and forums dedicated to Visual Basic. Or alternatively you can post them over here.

I will give some hints for the beginners to grasp the code. Unzip the file. Open Visual Studio. File->open->Project/Solution. Navigate to the unzipped folder. If the unzipped folder's name is dileepad, go to dileepad->dileepad->dileepad and now you must be seeing a folder with the first subfolder as bin. If not  navigate into one more dileepad subfolder. Finally there will be a Visual Studio Project file named "Dileepad" in the same folder which contains "bin" subfolder. Click on it and the whole project get's opened.

Form1.vb is the heart of the system and it contains the main interface of notepad while form2 is just created to tell about the software for "About" or "Credits". Form1.vb contains usable controls that I dragged and dropped from the tool box on the left hand side. And the things that the control does when a user presses it, is presented in the code behind it. Just double click the control and you can see the code behind it. Very simple and easy to grasp. To run the file, just press "F5".

I have two more system software codes to give you, they are of pure C-language and what those softwares are is a suspense for now.


  1. Not able to get through the link for your project!

  2. Not able to get through the link for your project!

  3. Hi Rishit,
    It got deleted I believe. I lost all my projects in a format. Anyway, you can search the internet for these things, there are plenty of examples.

    1. Hi Dileep,
      I'll do that!
      I had sent you an email few months back, so therefore, please check your inbox and yes it's kinda IMPORTANT!!!

      Thank You! :)