Department of Commerce (Ca) VISUAL BASIC (Semester-III) Unit - I

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

DEPARTMENT OF COMMERCE (CA)

VISUAL BASIC (Semester-III)


II M.COM (CA) Sub Code-18MCC32C
UNIT - I
First steps with Microsoft VB6: Integrated Development Environment - First program in VB
-Introduction to forms: Common properties, methods and events.
Introduction to Visual Basic
Visual Basic is an ideal programming language for developing sophisticated professional
applications for Microsoft Windows. It makes use of Graphical User Interface (GUI) for creating
robust and powerful applications. The GUI as the name suggests, which enables users to interact
with an application. This feature makes it easier to comprehend things in a quicker and easier
way. Coding in the GUI environment is quite a transition to traditional, linear programming
methods where the user is guided through a linear path of execution and is limited to a small set
of operations. In a GUI environment, the number of options open to the user is much greater,
allowing more freedom to the user and developer. Features such as easier comprehension, user-
friendliness, faster application development and many other aspects such as introduction to
ActiveX technology and Internet features make Visual Basic an interesting tool to work with.
The "Visual" part refers to the method used to create the graphical user interface (GUI). Rather
than writing numerous lines of code to describe the appearance and location of interface
elements, we can simply add prebuilt objects into place on screen. The "Basic" part refers to the
BASIC (Beginners All-Purpose Symbolic Instruction Code) language, a language used by more
programmers than any other language in the history of computing. Visual Basic has evolved
from the original BASIC language and now contains several hundred statements, functions, and
keywords, many of which relate directly to the Windows GUI. Beginners can create useful
applications by learning just a few of the keywords, yet the power of the language allows
professionals to accomplish anything that can be accomplished using any other Windows
programming language.

Need for VB
Graphical User Interfaces, or GUIs have revolutionized the microcomputer industry. They
demonstrate that the proverb,” is worth a thousand words,” hasn’t lost its truth to most computer
users. Windows applications have a consistent user interface. This means that users can spend
more time mastering the application and less time worrying about which keystrokes do what
within menus and dialog boxes. Windows programs are expected to be based on the GUI model.
Therefore, if we need to develop programs for any version of windows, we want a tool to
develop GUI-based applications efficiently. In order to develop GUI applications, Visual basic
was introduced in 1991.

The features of Visual basic are:


● More Internet features.

1
● Better support for database development.
● More language features.

Steps to design a VB application:

2
3
Integrated Development Environment

The working environment in Visual Basic is often referred to as the integrated development
environment or IDE because it integrates many different functions such as design, editing,
compiling, and debugging within a common environment. In most traditional development tools,
each of these functions would operate as a separate program, each with its own interface. In this
section, the following topics are discussed:

● Starting the Visual Basic IDE Getting up and running.

● Integrated Development Environment Elements An introduction to the various parts


of the IDE.

● Environment Options Configuring Visual Basic to our personal preferences.

First Program in Visual Basic

● Step 1: Download Visual Basic. ...


● Step 2: Create Your Project. ...
● Step 3: Add Controls. ...
● Step 4: Edit Control Properties. ...
● Step 5: Add Code. ...
● Step 6: Save and Test. ...
● Step 7: Final Thoughts.

Form Window

4
In the form window there is a control menu in which the user can restore, move, size,
minimize, maximize and close the form. The user can load, unload, show and hide the
form.

Common properties

1. Back color property


2. Caption property
3. Startup position property
4. Window state property
5. Font property
6. Icon property

Methods and Events

Forms and controls also support various actions that may be taken. The actions are
known as methods and events. There are three events :

1. Select suitable controls


2. Set the properties
3. Write the code

REFERENCE :
1. Programming Microsoft Visual Basic- Francesco Balenda, WP Publications and
Distributors. 2. Visual Basic 6-Gary Cronell, TataMcGraw Hill Publishing
Compnay Ltd.
3. Visual Basic 6 – How to Program, H.M.Deitel., P.J .Deital and T.R.Nieto

Prepared by Dr.N.SHANMUGAVADIVU

You might also like