Docstoc

My WordPad

Document Sample
My WordPad Powered By Docstoc
					          Project




        2005-2006

       Submitted By
          Asif Aziz



      Project Guides
    Mr. Indresh Kumar Singh



AAI-DEEMED UNIVERSITY
                       Contents
1. Introduction
2. Objectives
3. Project Category
4. Tools
5. Program Structure
6. Coding
7. Documentation
INTRODUCTION
      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.
OBJECTIVES
      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
visual basic.
      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.
PROJECT CATAGORY
      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
         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
tools.
         There are many tools used here to create this application, some are
describes below:-
   1. Text Box
   2. Command Buttons
   3. Labels
   4. Menus
   5. Toolbar
   6. Status Toolbar


   Text Box:- The text box controls provides an area to enter or display
   text
   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.




.
PROGRAM STRUCTURE
CODING
        This project contains the number of forms which are describe as per
following:-
   1.   Log In Window Form
   2.   Splash Window Form
   3.   Main Text Editor Form




                          Coding Of Login Form




Option Explicit

Public LoginSucceeded As Boolean

Private Sub cmdCancel_Click()
  'set the global var to false
  'to denote a failed login
LoginSucceeded = False
  Me.Hide
End Sub

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
  Me.Hide
         frmSplash.Show


  Else
    MsgBox "Invalid Password, try again!", , "Login"
    txtPassword.SetFocus
    SendKeys "{Home}+{End}"
  End If
End Sub


Private Sub Form_Load()
End Sub
                      Coding Of Splash Form


Option Explicit


Private Sub Form_KeyPress(KeyAscii As Integer)


 Unload Me
End Sub


Private Sub Form_Load()
  lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "."
& App.Revision


End Sub


Private Sub Frame1_Click()
  Unload Me
End Sub


Private Sub Timer1_Timer()
Frmmain.Show
Unload Me
End Sub
                          Coding Of Main Form



Private Sub Form_Resize()
txteditbox.Height = ScaleHeight
txteditbox.Width = ScaleWidth
End Sub


Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
mnufileexit_Click
End Sub


Private Sub mnueditcopy_Click()
Clipboard.Clear
Clipboard.SetText txteditbox.SelText
End Sub


Private Sub mnueditcut_Click()
Clipboard.Clear
Clipboard.SetText txteditbox.SelText
txteditbox.SelText = ""
End Sub
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
Next location
End Sub


Private Sub mnueditpaste_Click()
txteditbox.SelText = Clipboard.GetText()
End Sub


Private Sub mnufileexit_Click()
End
End Sub


Private Sub mnufilenew_Click()
Dim reply
reply = MsgBox("Save The Current File ?", vbYesNo, "Save...")


If reply = vbYes Then
mnufilesave_Click
End If
Frmmain.txteditbox.Text = ""


sfile = ""
End Sub


Private Sub mnufileopen_Click()
CommonDialog1.ShowOpen
CommonDialog1cancel error = false
sfile = CommonDialog1.FileName
if (sfile=” ”) then
msgbox ” You Have Not Entered Any File Name”
else
Open sfile For Input As #2
Frmmain.txteditbox.Text = Input(LOF(2), 2)
Close #2
End Sub
End if


Private Sub mnufileprint_Click()
CommonDialog1.ShowPrinter


End Sub


Private Sub mnufilesave_Click()
CommonDialog1.Showsave
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"


else
Open sfile For Output As #2
Print #2, Frmmain.txteditbox.Text
Close #2
end if


End Sub


Private Sub mnufilesaveas_Click()
sfile = ""
mnufilesave_Click
End Sub


Private Sub Mnuformatcolor_Click()
CommonDialog1.ShowColor
txteditbox.BackColor = CommonDialog1.Color
End Sub


Private Sub Mnuformatfont_Click()
CommonDialog1.Flags = cdlCFBoth
CommonDialog1.ShowFont
txteditbox.Font = CommonDialog1.FontName
End Sub




Private Sub mnuhelpabout_Click()
MsgBox "This is a text editor using Visual Basic", 64, "About My Text
Editor"
End Sub


Private Sub mnuhelpcredit_Click()
MsgBox "Asif Aziz, B.Sc (IT) AAI-Deemed University", 64, "Developed
By......"


End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Key
Case Is = "New"
mnufilenew_Click
Case Is = "Open"
mnufileopen_Click
Case Is = "Save"
mnufilesave_Click
Case Is = "Cut"
mnueditcut_Click
Case Is = "Copy"
mnueditcopy_Click
Case Is = "Paste"
mnueditpaste_Click




End Select
End Sub


Private Sub txteditbox_Change()


End Sub
DOCUMENTATION
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.

				
DOCUMENT INFO
Shared By:
Tags: Word
Stats:
views:21
posted:9/16/2012
language:English
pages:24
Description: This Is a simple and nice application making method for My World PAd .India is a developing country and making efforts on every field to make develop it. Mainly Education is the Backbone of every country without well educated people it is impossible to develop the country, so this is the main aim of the India to spread good education in every place of India either in mountains or fields means everywhere. And this is the result of nice planning and of hard work it has a Unique name in the world in Education. As we know that Indian I.T Specialist are the most demand able persons in the world. So many other country are interested in to send there students to India to become a good nationalist. There are lots of colleges in India who are shining this Country. Success is the Key of a good management in every field even in our Life without any well management we can't plan future. It can be understand easily, as a example we can take our Home, in our home we founds normally every thing is allocated in its given places due to of Management, And in other hand Nature is best example for it. Sun always rises from its exact position and sets on its exact position, and many more examples like water cycle, day-night etc.... This is the Management Of The God. So management is important every where also in Industries and Companies too.