software specification - vb and access

Upload: prakash-jayaraman

Post on 04-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Software Specification - Vb and Access

    1/12

    SOFTWARE SPECIFICATION

    Microsoft Visual Basic

    Introduction

    Microsoft Visual Basic is a development environment used to create programs or applications for

    the Microsoft Windows family of operating systems. To do this, it uses a computer language that

    was originally called Basic but has been transformed in an advanced language also called Visual

    Basic. This language makes it particularly easy to create effective applications because it offers a

    working tool as a studio equipped with necessary materials to keep you moving.

    Microsoft Visual Basic ships in three packages and sometimes various formats. The way you launch

    it depends on how it was installed. We will first analyze the studio and review some of its

    equipments, and then we will start creating small applications.

    Starting Microsoft Visual Basic depends on how it was set up on your machine. If it were installed

    as a stand alone product, it would be available under the Programs menu; otherwise, it might be

    under the Microsoft Visual Studio group of applications. However it was installed, now is the time

    to launch it.

    Integrated Development Environment (IDE)

    1. To launch Visual Basic, on the Taskbar, click Start ->(All) Programs -> Microsoft Visual

    Studio 6.0 -> Microsoft Visual Basic 6.0

    2. When Microsoft Visual Basic starts, the New Project dialog box comes up:

    http://hhctrl.textpopup%28action%2Cpopfont%2C9%2C9%2C-1%2C-1%29/http://hhctrl.textpopup%28action%2Cpopfont%2C9%2C9%2C-1%2C-1%29/http://hhctrl.textpopup%28action%2Cpopfont%2C9%2C9%2C-1%2C-1%29/http://hhctrl.textpopup%28action%2Cpopfont%2C9%2C9%2C-1%2C-1%29/
  • 7/29/2019 Software Specification - Vb and Access

    2/12

    At this time, we will not go through what all these icons mean. Just make sure that the

    Standard EXE icon is selected and click Open

    3. A typical studio such as the one used by Visual Basic is referred to as an Integrated

    Development Environment (IDE).

    As a classic application, Microsoft Visual Basic displays a title bar on top. The title bar is

    mainly made of three sections.

    On the most left side, there is the application icon. This icon has a menu of its own. To see the

    menu, click the small icon and click Maximize (or Restore)

    4. On the right side of the application icon, the name of the file allows to identify what you are

    working on. Microsoft Visual Basic names each one of its applications a project.

    A Project is a collection of files used to build a particular application. When Visual Basic

    starts, it calls the first application Project1. When you save a project, you give it an appropriate

    name, and the name on the title bar gets updated.

    On the right side of the Project1, the name helps to know what environment you are using to

    build your application.

    The Microsoft Visual Basic name is followed by the empty area of the title. This area can be

  • 7/29/2019 Software Specification - Vb and Access

    3/12

    used as a menu to maximize or restore a window.

    To experiment with it, double-click the empty section of the title bar. Notice that the window

    has been maximized (or restored) again

    5. The last three buttons on the title bar are used to perform windows operations. Every one of the

    buttons has a name. To find out a button's name, position your mouse on top of it and a name

    will appear.

    To experiment with the buttons, click the Minimize button

    6. To bring back Microsoft Visual Basic, on the Task bar, click Project1.

    7. Under the title bar, you have a menu made of words such as File, Edit, View, etc. These allow

    you to perform almost any kind of operation. To use a menu, you click one of the words. Amenu drops down and you make another selection from it.

    We need to review how a menu functions because as a programmer, you will have to create a

    menu or menus sooner or later.

    There are typically four kinds of menus here.

    A disabled menu is a menu that is temporarily unavailable. This

    could be due to anything. For example, it might wait for another action to happen. Sometimes,

    there might be something running on the background and this would disable a function of your

    program or the application.

    To view an example of such menus, on the main menu, click Edit and observe a lot of disabled

    menus.

    To see another, position the mouse on Diagram and notice that the whole Diagram menu is

    disabled.

    8. An enabled menu standing by itself will usually perform a

    brief action, sometimes leaving the impression that nothing happened. This kind of menu can

    be used to quickly save a file, display a toolbar, etc.

    To see an example, on the main menu, click Edit -> Copy. It looks like nothing happened. The

    form (or if anything else was selected) has been copied to the clipboard, which is a temporary

    storage area of your computer.

    9. To see another kind, on the main menu, click View -> Locals Window. Notice that there is a

    new section on the screen now.

  • 7/29/2019 Software Specification - Vb and Access

    4/12

    10. A menu with three periods () is typically used to launch or open a

    dialog box.

    To experiment with it, on the main menu, click Tools -> Options Notice that the Options

    dialog displays.

    11.The Options dialog is made of various property sheets. Click the Editor Format property sheet.

    From the Code Colors list box, click Normal Text. Click the Foreground combo box and select

    a green color.

    From the Code Colors list, click Selection Text. Click the Foreground combo box and select

    blue. Click the background combo box and select the lime color

    12. Click Comment Text. Click the Foreground combo box and select dark gray.

    Click Keyword Text. From the Foreground combo box, select blue.Click Identifier Text. From the Foreground combo box, select pink.

  • 7/29/2019 Software Specification - Vb and Access

    5/12

    13. Click OK. At this time, we cannot yet experiment with the new settings.

    14. A menu with an arrow indicates that it has a sub-menu, which is a

    child menu.

    To see an example, on the main menu, click View -> Toolbars. Notice the items under the

    Toolbars menu.

    15. To see another menu like that, position the mouse on Format -> Center In Form.

    16. Whenever a menu is opened but you don't want to use it, you can dismiss it with the Esc key.

    To dismiss the current menu, press Esc. Press Esc again.

    17. Some menu items present a key or a combination of keys on their line: this is called a shortcut.

    A shortcut is a key or a combination of keys that allows you or the user to perform an action

    quicker than using the menu.

    Some shortcuts can be seen on the menu of Visual Basic. Some other shortcuts are part of

    Microsoft Windows operating systems.

    To see a list of some of the shortcuts, on the main menu, click Edit. Observe the list of

    shortcuts and the actions they are associated with.

    18.Press Esc to dismiss the menu.

    19. To use a one-key shortcut, just press the corresponding key. For example, press F5. Notice that

    the form changes its looks. Actually the form went from its design state to its running state.

    20.To close the running form, click its close button .

    21. To use a combination of keys, press the first key (or one of the keys), and then press the other

    or others. Finally release the keys.

    To experiment with other shortcuts, press and hold Ctrl, then press F5. Notice that the form

    runs again as an application.

    22.To close the running form, since it is treated as a complete application, press Alt + F4.

    Some other shortcuts are part of the operating system. For example,

    Ctrl + Esc would open the Start menu; Alt + F4 is used to close

    applications.

    23.Under the menu, there is a toolbar. This first toolbar is called the Standard toolbar.

    The Standard toolbar allows you to perform many of the most common actions that would

  • 7/29/2019 Software Specification - Vb and Access

    6/12

    require the main menu, except that the toolbar is handier and closer to the user, which makes it

    faster.

    A toolbar is made of buttons that you click to perform the corresponding action.

    At first, nothing is obvious with these buttons. Therefore, to find out what a particular button is

    used for, position your mouse on top of it and keep it there for 2 seconds. A word and group of

    word will appear: this is the tool tip, allowing you to identify the button. The buttons are

    usually named after their tool tip.

    To get acquainted with some of the buttons, position your mouse on the first button for 1 or 2

    seconds and observe the tool tip.

    24. Move the mouse to another button and read the tool tip.

    25.To experiment with one of the button, on the Standard toolbar, click the Start button .

    Notice that the form runs in its execution state.

    26.To stop the running form, on the Standard toolbar, click the End button .

    27. Some of the buttons on the toolbar have an arrow on them. This indicates that the button,

    behaving like a menu or a combo box, can display more items when you click its arrow.

    To see an example, click the arrow of the Add Form button. Notice other items available.

    28. Without clicking, move the mouse to the arrow of the first button on the toolbar, the Add

    Standard EXE Project button.

    29. To dismiss the menu, click the arrow of the same menu.

    30. The main area of the studio is made of a rectangular box called a form and is typically

    identified as Form1; if you create additional forms, by default, they would be identified as

    Form2, Form3, or FormX.

    31. The Toolbox provides the necessary tools to create your applications.

  • 7/29/2019 Software Specification - Vb and Access

    7/12

    The Toolbox comes with a lot of controls to start working. It

    can also be enhanced with more objects that we will review as

    we move on.

    Like the items on the Standard toolbar, the controls on theToolbox are not always obvious. To find out what kind of

    control is displayed, position your mouse on a control and

    observe the tool tip. Review different items until you find the

    one you want.

    To use a control from the Toolbox, click it and draw it on your

    form. When no object is being used, the Pointer is selected.

    Once you select one of the controls, the pointer loses focus

    and you can use the selected control.

    We will learn how to use the controls in another lesson.

    Notice that the right section of the Standard toolbar displays

    the dimensions of the form.

    32.The Properties Window displays a list of the properties associated with each control or form

    that are part of your project.

    A property is anything that characterizes an object. When you look at a control, you see that it

    has a size, a color, a caption (something written on some controls; for example, on top of the

    form, the caption is Form1), etc.

    Different controls have different sets of properties.

    To experiment with controls properties, on the Properties Window, click the (Name) field and

    type frmTimeSheet

    Notice that even though you clicked (Name), the name has been changed.

    33.Click the Caption field and type: Time Sheet

    34. The Project Explorer window gives a list of the forms and modules that are part of the current

    project.

  • 7/29/2019 Software Specification - Vb and Access

    8/12

    To experiment with the Project Explorer

    window, click the Toggle Folders button

    Advantages

    1. The structure of the Basic programming language is very simple, particularly as to the

    executable code.

    2. VB is not only a language but primarily an integrated, interactive development environment

    (IDE).

    3. The VB-IDE has been highly optimized to support rapid application development (RAD). It

    is particularly easy to develop graphical user interfaces and to connect them to handler

    functions provided by the application.

    4. The graphical user interface of the VB-IDE provides intuitively appealing views for the

    management of the program structure in the large and the various types of entities (classes,

    modules, procedures, forms, ).

    5. VB provides a comprehensive interactive and context-sensitive online help system.

    6. When editing program texts the IntelliSense technology informs you in a little popup

    window about the types of constructs that may be entered at the current cursor location.

    7. VB is a component integration language which is attuned to Microsofts Component Object

    Model (COM).

    8. COM components can be written in different languages and then inegrated using VB.

    9. Interfaces of COM components can be easily called remotely via Distributed COM

    (DCOM), which makes it easy to construct distributed applications.

    10.COM components can be embedded in / linked to your applications user interface and also

    in/to stored documents (Object Linking and Embedding OLE, Compound Documents).

    11. There is a wealth of readily available COM components for many different purposes.

    12. Visual Basic is built around the .NET environment used by all Microsoft Visual languages, so

    there is very little that cant be done in Visual Basic that can be done in other languages (such

    as C#).

    http://en.wikipedia.org/wiki/BASIChttp://en.wikipedia.org/wiki/Integrated_development_environmenthttp://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/IntelliSensehttp://en.wikipedia.org/wiki/Object_Linking_and_Embeddinghttp://en.wikipedia.org/wiki/BASIChttp://en.wikipedia.org/wiki/Integrated_development_environmenthttp://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/IntelliSensehttp://en.wikipedia.org/wiki/Object_Linking_and_Embedding
  • 7/29/2019 Software Specification - Vb and Access

    9/12

    MICROSOFT ACCESS

    Microsoft Access is a Relational Database Management System (RDBMS), designed

    primarily for home or small business usage.

    Access is known as a desktop database system because it's functions are intended to be runfrom a single computer. This is in contrast to a serverdatabase application (such as SQL

    Server), where it is intended to be installed on a server, then accessed remotely from multiple

    client machines.

    Microsoft (or MS) Access is a software package that you install just like any other software

    package, and is bundled as part of the Microsoft Office suite.

    Access Versus Excel

    You may be wondering what the benefits of using Access are compared with using an Excel

    spreadsheet. Well, it really depends on what you want to do with the data that you're storing

    and how much data you intend to store.

    Excel may be fine if you've only got a small amount of data, and if you don't have many

    attributes against each piece of data. It may be fine if you don't have much in the way of

    relational data across multiple worksheets. Once you start storing many attributes against

    each piece of data, and perhaps you find yourself repeating information across multiple

    worksheets, then it's time to start using Access (or another database system if you prefer).

    Another important reason for using Access over Excel is, if you need to generate a lot of

    queries and reports. Access is much better suited for doing this compared to Excel.

    Microsoft Access Database File Extension

    When you create (and save) a database in Microsoft Access, the database is saved with

    a .mdb extension. This is the file extension you will use the most, when developing Access

    databases. Once you've established your database, you also have the option of saving it as

    anMDE file, which gives you some benefits over the MDB file. An MDE file uses

    a .mde extension.

    Creating a database in Microsoft Access is relatively straightforward. This lesson

    demonstrates how to create a database.

  • 7/29/2019 Software Specification - Vb and Access

    10/12

    1. You may notice that, whenever you start Microsoft Access, you see the following

    screen. In this case, you can simply select "Blank Database".

    If you already have Access open, you can go to the "File" menu and click on "New

    Database":

    2. Choose "Blank Database". (Skip this step if you already chose "Blank Database" at

    step one). You also have the ability to choose from a template, but we'll just use a

  • 7/29/2019 Software Specification - Vb and Access

    11/12

    blank database here:

    3.Choose a location to save the database:

    Your New Database

    Once you've completed the above tasks, you should see a blank database, like this:

  • 7/29/2019 Software Specification - Vb and Access

    12/12

    We know this database is blank because it doesn't have any tables. If it did, you would see

    these tables in the middle pane of the table tab. Now that we have our blank database, we canstart adding some tables.