Friday, November 22, 2013

Visual Basic Form



  • Form is window style screen that Visual Basic program displays.
  • It is where controls and codes are added.
  • Acts as containers for controls
  • It is where controls are drawn and viewed.
  • The layout of the form on a screen be previewed through the Form Layout Window command on the View menu
  • Has a Maximize, Minimize, and close buttons.
Form Properties
  • Name
    • An object’s Name property must start with a letter and can be a maximum of 40 characters
    • It can include numbers and underline(_) characters but can’t include punctuation or spaces
  • Appearance
    • Specifies the paint style of controls on a MDIForm or Form object at design time.
  • Caption
    • Determines the text displayed in the Form or MDIForm object’s title bar
    • Except for the label control, form and all other controls that have captions, the limit is 255 characters
    • Long caption for the form’s title bar is clipped
  • Enabled
    • Determines whether a form or control can respond to user-generated events.
  • Control Box
    • Indicates whether a Control-menu box is displayed on a form at run time.
  • MaxButton
    • Specifies a value indicating whether a form has a Maximize button.
  • MinButton
    • Specifies a value indicating whether a form has a Minimize button
  • Movable
    • Specifies if the object can be moved or not.
  • Visible
    • Specifies a value indicating whether an object is visible or hidden
  • WindowState
    • Specifies a value indicating the visual state of a form window at run times.

Thursday, November 21, 2013

Integrated Development Environment (IDE)

    • Like any other Windows application, VB consists of multiple windows which appear at startup.
    • The windows displayed in VB are collectively known as the Visual Basic Integrated Development Environment (IDE)
    • In particular, VB has the following windows:
    • Main window which contains Menu and Toolbar
    • Toolbox
    • Project Explorer Window
    • Property Window
    • Form
    • Code Window
    Main Window.  
    • This is the only element of the IDE which is always visible
    Toolbox Window.
    • This is simply a library of controls which can be placed on the application.
    • It is used to add art work, labels, buttons, list boxes, scroll bars, menus, and geographic shapes to a user interface.
    • Once all the controls needed are placed onto the applications forms, the toolbox can be hidden to make room for working in the other elements of the IDE.
    Project Window
    • This is simply a list of all forms and modules which make up your VB project.
    Property window
    • Controls such as button, scrolling text boxes, pictures boxes and other features of the most VB applications allow you to enter parameters which define how these control works.
    • In VB, these parameters are called properties.
    • Some properties can be entered at design time within the IDE, while others must be entered with code while the program is running.
    Form Window
    • They are the windows which hold the various controls (buttons, text boxes, etc) which make up your application.
    Code window
    • This is where you type in the code that VB executes. Notice that the heading of the window indicates with which event the code is associated.

    Visual Basic Terminologies

    Control. A tool used to create objects on a Visual Basic form. It is used to create user interface elements, such as command buttons, image boxes, and list boxes.

    Objects. The name of a user interface element you create on a Visual basic form by using a toolbox control. They have what is known as inherent functionality.

    Property. A value or characteristic held by Visual Basic object, such as Caption or Forecolor. Properties can be set at design time by using the Properties window or at run time by using statements in the program code.

    Event Procedure. A block of code that is executed when an object is manipulated in a program. They typically evaluate and set properties and use other program statements to perform the work of the program.

    Program Statement. A keyword in the code that does the work of the program. They create storage space for data, open files, perform calculations, and do several other important tasks.

    Method. A special statement that performs an action or a service for a particular object in a program.

    Class. An implementation of an object type. It has a data structure and methods that specify the operations that may be used with that data structure.

    Inheritance. Objects are organized into object classes, which are groups of objects sharing structural and behavioral characteristics.

    Encapsulation. The result (or act) of hiding implementation details (information hiding) of an object from its user.

    Abstraction. The benefit of being able to ignore the inner details of an object in order to focus on the aspects of the object needed to use.

    Polymorphism. Creates objects that perform the same functions as the base object but performs some of these functions in a different way. 


    Wednesday, November 20, 2013

    Visual Basic Overview


    • Visual Basic is a high level programming language evolved from the earlier DOS version called BASIC
    • Visual Basic is a software development system developed by Microsoft to support creating applications for the Windows operating systems.
    • Visual Basic introduced the concept of an event-driven programming model
    • Visual Basic has incorporated the concept of objects.
    History of Visual Basic
    • BASIC stands for Beginner’s All-purpose Symbolic Instruction Code.
    • Developed by John Kemeny and Thomas Kurtz in mid-1960s.
    • Visual Basic was developed in mid-1991 by the Microsoft Corporation.
    Why Visual Basic?
    • Power and complete Windows application development system
    • Supported by third party products
    • Supports the principle of object driven design
    • Very flexible
    • User-friendly
    • Provides a Graphical User Interface or GUI.
    • The sequence of instructions executed in the program is controlled by events