Mr. Indresh Kumar Singh
3. Project Category
5. Program Structure
Visual basic is a windows programming language that has been
developed at Microsoft Corporation. Visual basic is powerful programming
language to develop sophisticated windows programs very quickly.
Visual basic is one of the RAD (Rapid Application Development) tools
as it enables the programmer to develop application very easily & quickly.
This project is designed using of Microsoft Visual Basic 6.0, the most
useful software development Program.
This project is on the base of Microsoft’s Notepad the most using text
editor. This project is contains a text editor in which we can format our text
using more powerful menus.
My word Pad is a basic text editor you can use for simple documents
or for creating Web pages. To create or edit files that requires formatting,
use My WordPad.
The objective of our project is to text editing. In this project we can
edit our text more easily and safely by very powerful tools and menus. We
can type our documents in this text editor. This text editor is designed using
If you only need to create simple documents, My WordPad is your
best choice. This project contains very powerful tools of Microsoft visual
basic as like Text box, Command buttons, labels, menus and other tools.
Word processors provide even more text formatting options, such as
automatically numbering lines of text, creating columns, or inserting frames.
Because “My WordPad” supports only very basic formatting, you
cannot accidentally save special formatting in documents that need to
remain pure text. This is especially useful when creating HTML documents
for a Web page because special characters or other formatting may not
appear in your published Web page or may even cause errors.
This is a complete text editor application for any operating system.
Through this application we completely format text.
This application provides basic text editing capability. My WordPad
provides only the most basic text formatting. You can specify a font and
insert tabs. The font applies to the whole document, not an individual
paragraph or word, and it is not saved with the file. If someone else looks at
the file on another computer, that person will see whatever font is available.
Tools provides us the various methods that could be used &
environment guise a platform to the work in the project language is Visual
Basic. We can not think of any attractive presentation without the help of
There are many tools used here to create this application, some are
1. Text Box
2. Command Buttons
6. Status Toolbar
Text Box:- The text box controls provides an area to enter or display
Command Buttons:- The button control carries out a command or
action when a user choose it.
Labels:- The label control displays text a user can interact with or
modify and change the caption.
Menus:- “Menu ” utility of Visual Basic can be accessed from tools
menu in the forms design screen. This utility is used for creating menus.
Toolbar:- Toolbar are collection of icons, which provide mouse driven
shortcuts to menu options.
Status Toolbar:- The Status bar is a common window feature. The status
bar is normally at the bottom of the window and on the status bar certain
information can displayed like Date, Time , Ins, Caps etc.
This project contains the number of forms which are describe as per
1. Log In Window Form
2. Splash Window Form
3. Main Text Editor Form
Coding Of Login Form
Public LoginSucceeded As Boolean
Private Sub cmdCancel_Click()
'set the global var to false
'to denote a failed login
LoginSucceeded = False
Private Sub cmdOK_Click()
'check for correct password
If txtPassword = "12345" And txtUserName = "asif" Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True
MsgBox "Invalid Password, try again!", , "Login"
Private Sub Form_Load()
Coding Of Splash Form
Private Sub Form_KeyPress(KeyAscii As Integer)
Private Sub Form_Load()
lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "."
Private Sub Frame1_Click()
Private Sub Timer1_Timer()
Coding Of Main Form
Private Sub Form_Resize()
txteditbox.Height = ScaleHeight
txteditbox.Width = ScaleWidth
Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
Private Sub mnueditcopy_Click()
Private Sub mnueditcut_Click()
txteditbox.SelText = ""
Private Sub mnueditfind_Click()
Find = InputBox("Find What Text?", "find")
If Find = "" Then Exit Sub
lenfind = Len(Find)
lensource = Len(txteditbox.Text)
For location = txteditbox.SelStart To lensource
txteditbox.SelStart = location
txteditbox.SelLength = lenfind
If txteditbox.SelText = Find Then Exit Sub
Private Sub mnueditpaste_Click()
txteditbox.SelText = Clipboard.GetText()
Private Sub mnufileexit_Click()
Private Sub mnufilenew_Click()
reply = MsgBox("Save The Current File ?", vbYesNo, "Save...")
If reply = vbYes Then
Frmmain.txteditbox.Text = ""
sfile = ""
Private Sub mnufileopen_Click()
CommonDialog1cancel error = false
sfile = CommonDialog1.FileName
if (sfile=” ”) then
msgbox ” You Have Not Entered Any File Name”
Open sfile For Input As #2
Frmmain.txteditbox.Text = Input(LOF(2), 2)
Private Sub mnufileprint_Click()
Private Sub mnufilesave_Click()
CommonDialog1.cancel error = false
sfile = CommonDialog1.FileName
If sfile = "" Then
Msg box “You Have Not Saved Your File ?”
CommonDialog1.Filter = "text files|*.batch files|*.bat|ini files|*.ini"
Open sfile For Output As #2
Print #2, Frmmain.txteditbox.Text
Private Sub mnufilesaveas_Click()
sfile = ""
Private Sub Mnuformatcolor_Click()
txteditbox.BackColor = CommonDialog1.Color
Private Sub Mnuformatfont_Click()
CommonDialog1.Flags = cdlCFBoth
txteditbox.Font = CommonDialog1.FontName
Private Sub mnuhelpabout_Click()
MsgBox "This is a text editor using Visual Basic", 64, "About My Text
Private Sub mnuhelpcredit_Click()
MsgBox "Asif Aziz, B.Sc (IT) AAI-Deemed University", 64, "Developed
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case Is = "New"
Case Is = "Open"
Case Is = "Save"
Case Is = "Cut"
Case Is = "Copy"
Case Is = "Paste"
Private Sub txteditbox_Change()
Title:- The title of the Project is “My WordPad” as it contains all the
procedures of any Text Editor would require.
Design:- This project is designed on the base of text editor. The
application starts with a password window, whenever user would not
inserted a correct user name and password the application will not start.
After accessing in the login form another form opens calls splash form and
then opens the main form of the project, which is our “My WordPad”.
This is a very powerful application just like Notepad, here we can edit
our text and can create any HTML file. There are several options used in
this application by which our editing can done easily and simply.