Quantcast
Channel: AMAZING SECRETS OF HACKING » visual basic
Viewing all articles
Browse latest Browse all 3

Introduction Visual Basic Language and Environment

$
0
0

Introduction Visual Basic Language and Environment

In this first post we will do a quick overview of how to build an application in visual basic. You will learn a new Vocabulary, a new approach to programming and ways to move around in the visual basic environment.

What is Visual Basic?

It is a tool that allows you to develop windows application. The application have a familiar appearance to the user and It is event-driven, meaning code remains idle until called upon to respond to some event. It is governed by an event processor. Nothing happens until an event is detected. Once an event is detected, the code corresponding to that event is executed.

Visual Basic 6.0 versus other version of visual basic

  • The original visual basic for DOS and visual basic for windows were introduced in 1991
  • Visual Basic 3.0 was released in 1993
  • Visual Basic 4.0 released in late 1995
  • Visual Basic 5.0 released in late1996 new environment, supported creation of active x controls, deleted 16 bit application support
  • Visual Basic 6.0 some identified new feature of visual basic 6.0

Application is made up of:

  1. Forms: Windows that you create for user interface.
  2. Controls: Graphical feature draw on form to allow user interaction
  3. Properties: Every characteristic of a form or control is specified by a property
  4. Methods: Built in procedure that can be invoked to import some action to a particular object.
  5. Event Procedures: Code related to some objects. This is the code that is executed when a certain event occurs.
  6. General Procedures: Code not related to objects. This code must be invoked by the application
  7. Modules: Collection of general procedures, variable declaration  and constant definition used by application

Step in Developing Application

There are three primary steps involved in building a visual basic application

  1. Draw the user interface
  2. Assign properties to controls
  3. Attach code to controls

Draw the user interface and setting properties

Visual Basic operates in three modes

Design Mode – Used to build application

Run mode – Used to run a

Break mode – application halted and debugger is available

We focus here on the design mode six windows appear when you start

 

We focus here on the design mode

Six windows appear when you start

 

Visual Basic

 The main window consists of the tittle bar indicates the project name, the current visual basic operating mode and the current form. The menu bar has drop down menus from which you control the operation of the visual basic environment. The toolbar has buttons that provide shortcuts to same of the menu options. The main window also shows the location of the current form relation to the upper left corner of the screen and the width and the length of the current form

 Introduction Visual Basic

The form window is central to developing visual basic application. It is when you draw your application.

Introduction Visual Basic

The toolbox is the selection menu for controls used in your application

Introduction Visual Basic

The properties window is used to establish initial property values for objects. The drop – down box at the top of the window.

Lists of all objects in the current form

Two views are available:

1) Alphabetic

2) categorised

Under this box are the available properties for the currently selected objects.

Introduction Visual Basic

The form layout window shows where your form will be displayed relative to your monitor’s screen:

Introduction Visual Basic

The project window displays a list of all forms and module making up your application. You can also obtain a views of the form of code windows from the projects window.

Introduction Visual Basic

As mentioned the user interface is draw in the form window.There are two ways to place controls on a form:

1) Double click the tool in the toolbox and it is created with a default size on the form. You can then move it or resize it.

2) Click the tool in the toolbox, then move the mouse pointer to the form window. The cursor change to a crosshair. Place the crosshair at the upper left corner of where you want the control to be press the left mouse button and hold it down while dragging the cursor toward the lower right corner. When you release the mouse button, the control is drawn.

Introduction Visual Basic

  • To move a control you have to draw  click the object in the form window and drag it to the new location. Release mouse button
  • To resize the control , click the object so that it is select and sizing handles appear. Use these handles to resize the object.

For visual :

Further information see the next post on this thanx

The post Introduction Visual Basic Language and Environment appeared first on AMAZING SECRETS OF HACKING.


Viewing all articles
Browse latest Browse all 3

Trending Articles