INTRODUCTION TO VISUAL BASIC 6.0

INTRODUCTION
There are literally hundreds of programming languages. Each was developed to solve a particular type of problem. Most traditional languages such as BASIC, C, COBOL, FORTRAN, PL/1 and Pascal are considered as procedural languages. In procedural languages the program specifies the exact sequence of all operations. Program logic determines the next instruction to execute in response to conditions and users request.

Newer programming languages such as C++, and Visual BASIC use a different approach known as Object-Oriented programming and event driving programming. Visual Basic is an event driven programming language used to write application programs that runs in windows operating environment. It has many but not all the elements of an object oriented language such as java. In the event driven model, programs are no longer procedural i.e. don’t follow a sequential logic. 



 OBJECTIVES
·         Understand the benefits of using Microsoft Visual Basic 6.0 for Windows  as an application tool
·         Understand the Visual Basic event-driven programming concepts, terminology, and available tools
·         Learn the fundamentals of designing, implementing, and distributing a  Visual Basic application
·         Learn to use the Visual Basic toolbox
·         Learn to modify object properties
·         Learn object methods
·         Use the menu design window
·         Understand proper debugging and error-handling procedures
·         Gain a basic understanding of database access and management using  data bound controls
·         Obtain an introduction to ActiveX controls and the Windows Application Programming Interface (API)

VISUAL BASIC’S VISUAL NATURE
Visual Basic 6 is more than just a programming language. The secret to Visual Basic is in its name: visual. With today’s Windows operating systems, a program must be able to interact with the screen, keyboard, mouse, and printer graphically. Older programming
Languages such as BASIC, worked well in a text-only computing environment, but such languages do not support the graphical interface needed for today’s computers. In Visual Basic we will work with objects which have properties and methods.

Objects: è a thing or noun eg forms and controls
Properties: è describes the objects such as name, color, size, location, behavior etc
Methods: è actions associated with the objects such as move, print, clear etc.

Visual Basic is a tool that allows you to develop Windows (Graphic User Interface - GUI) applications. The applications have a familiar appearance to the user. Visual Basic is event-driven, meaning code remains idle until called upon to respond to some event (button pressing, menu selection, ...). Visual Basic is governed by an event processor. Nothing happens until an event is detected. Once an event is detected, the code corresponding to that event (event procedure) is executed. Program control is then returned to the event processor.

Visual Basic comes in several varieties including the following:
• Visual Basic Enterprise Edition: Created for team programming environments and client/server computing where applications distribute processing and data among several computers.
• Visual Basic Professional Edition: Geared toward professional programmers who want to get the most from the Visual Basic programming environment. This edition includes a full set of tools and wizards that help you package and distribute applications.
• Visual Basic Learning Edition: The essentials with the standard complement of programming tools and everything one needs to get started programming. A multimedia CD-ROM called Learn VB Now comes with the package as well as a full set of Microsoft Developer Network documentation so that you will have the help that you require to learn and use Visual Basic.

Note: A special edition of Visual Basic comes with a package called Visual Studio. Visual Studio is a programming environment that supports several Microsoft languages including Visual Basic, Visual C++, and Visual J++. When you use Visual Basic, you use the same environment that users of these other languages also use. Therefore, if you move to another programming language, you will not have to master a new set of menus and dialog boxes.


STRUCTURE OF VISUAL BASIC PROJECT

Application (Project) is made up of:
·         Forms - Windows that you create for user interface
·         Controls - Graphical features drawn on forms to allow user interaction (text boxes, labels, scroll bars, command buttons, etc.) (Forms and Controls are objects.)
·         Properties - Every characteristic of a form or control is specified by a property. Example properties include names, captions, size, color, position, and contents. Visual Basic applies default properties. You can change properties at design time or run time.
·         Methods - Built-in procedure that can be invoked to impart some action to a particular object.
·         Event Procedures - Code related to some object. This is the code that is  executed when a certain event occurs.
·         General Procedures - Code not related to objects. This code must be invoked by the application.
·         Modules - Collection of general procedures, variable declarations, and constant definitions used by application.

THE PROGRAMMING PROCESS
When you write a Visual Basic project you follow three basic steps for planning and also repeat the process in creating the project. The three steps involved:
·         Setting up the user interface
·         Defining the properties
·         Creating the codes

Design User Interface
When you plan the user interface, you draw a sketch of the screen the user will see when running your project. On the sketch show the forms and all the controls that you plan to use, indicate the names that you want to give the form and each of the objects on the form.

Defining the Properties
For each object write down the properties that you plan to set or change during the design of the form.

Designing the Code

This step is where you write the procedures that will execute when your project is being run. You will also determine which events require action to be taking and make step by step plan for those actions.
Share on Google Plus

About Unknown

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment