0% found this document useful (0 votes)
13 views

VB UNIT - I

Uploaded by

sushain16kaushal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

VB UNIT - I

Uploaded by

sushain16kaushal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

UNIT - I

INTRODUCTION TO VB
1. Write a short note on VB IDE
Visual basic is not a simple programming language. It is an integrated development
environment (IDE) in which you can design, run, test, debug, and deploy different applications such
as standard Exe application ,DHTML application , IIS application , Web applications, XML web
Services and traditional client applications etc.....
Visual Basic IDE is a user friendly environment, it always starts with a project window rather than
a simple file window as it is normal in other cases. When you start Visual Basic, you get a project
window with a new project dialog.

Introduction to VB B.C.A Semester III: Visual Programming 1


Visual Basic main window contains six different windows as explained below
 Title Bar
 Menu Bar
 Tool Bar
 Tool Box.
 Project Explorer.
 Properties window.
 Form Layout window
 Form Design window.

1) The Title Bar: contains to title, working mode and control button.
• The project title (default title: Project 1)
• working mode:
Design - during designing the user interface and writing code.
Run - during running / testing the project.
Break - during his time errors or pause or break - points.
• Control Buttons:
Minimize - To minimize the screen
Maximize - To maximize the screen.
Close - To terminate the program execution.

2) The Menu Bar:

The menu bar contains the commands you need to work with Visual Basic. There are thirteen basic
menus are available to you, each focusing on a specific purpose.

Few of them are mentioned below: File, Edit, View, Project, Format, Debug, Run, Query,
Diagram, Tools, Add-Ins, Window and Help.

3) The Toolbars:
The Toolbar icon give quick access to commonly used menu commands. The toolbars is
displayed by default just below the menu bar.

4) The Tool Box:


The Tool box contains the icons of the controls you can place on a form to create the
application's User Interface.
By default, the Toolbox contains the pointer icon and the icons of 20 ActiveX controls

Introduction to VB B.C.A Semester III: Visual Programming 2


5) The properties window:
The properties window display the properties associated with the form or the control
selected on the form. The properties are attributes such as size, backcolor, forecolor, font etc.
Some properties. Like top, left, height, and width etc... Are command to both form and
controls, while other properties are unique to a form or control. Controls often differ in number and
type of properties.

6) The Form Layout window:

The Form Layout window which is at the lower-right corner of the Visual Basic IDE. It can
be used to specify the initial position of the form that should appear on the screen at run time.

When mouse pointer you can move the form around and place at desired position as if it is
move on the screen in which the form is displayed at run time.

7) Immediate window or watch window.

The immediate window at the bottom of the Visual Basic IDE. It is a debugging tool. While
an application is running we can stop and use the immediate window to examine or changes the
values of the applications variables and to execute visual basic commands in immediate mode.

8) Form Design window.


The Form Design window at the center of the Visual Basic IDE. It is the basic
building block of visual basic applications. Form Design window used to develop user
interface.
It allows placing other controls on it to make user interface exclusively easy and
attractive. Therefore it is considered as container object

Introduction to VB B.C.A Semester III: Visual Programming 3


2) Explain History of VB.

Earlier versions of VB (1.0 and 2.0) were considered as" Hobbyist's language" had limited
features and dismal performance compared to applications written in other languages Like C.
VB 3.0 become much more database friendly and MS Jet engine was introduces along with
MS access databases.

Visual basic 4.0 supported 32-bit programs; OCX or ActiveX and DLL were introduced
along with more powerful Jet engine.

Visual basic 5.0 was the first version of VB, which provided a native code compiler i.e.
generates machine code. It also supports ActiveX Documents, ActiveX DLL’s.

Visual basic 6.0 is the recent addition to the family of Microsoft Visual basic 6.0 is
specifically designed to utilize the internet. User can easily create web based applications called
ActiveX executables which are similar to Internet explorer 4.0 or higher web browsers.
VB 6.0 supports ADO (ActiveX Data objects ) DHTML and IIS (Internet Information
Services),ISAPI'S (Internet Service API).
The new formatting string, numeric functions and new validate events for input controls
increase the Learning rate of a novice programmer.
Today VB 6.0 has become technology leader, implementing new ways of doing things
before any other visual programming development tools.

3. Features of visual basic:

 Visual Features of visual Basic


 GUI Interface
 Modularization
 Object Oriented
 Debugging
 Macros IDE
 Data access
 ActiveX
 Internet capabilities
,
1) GUI Interface :
VB is a Graphical User Interface language. This means that a VB program will always show
something on the screen that the user can interact with to get a job done.

Introduction to VB B.C.A Semester III: Visual Programming 4


2) Modularization:
It is considered good programming practice to modularize your programs. Small modules
where it is clearly indicated what comes into the module and what goes out makes a program easy
to understand.

3) Object Oriented:
Object Oriented Programming is a Concept where the programmer thinks of the program
in "objects” that interact with each other". Visual Basic forces this good programming
practice

4) Debugging :
Visual Basic offers two different options for code debugging .Debugging Managed code
Runtime Debugger. The Debugging Managed Code individually debugs c and C++
applications and Visual Basic windows applications. The Runtime Debugger helps to find
and fix bugs in programs at runtime.

5)Data Access Feature :

By using data access feature, we can Create databases, scalable server-side Components
for most databases, including Microsoft SQL Server and other enterprise level database

6) Macros IDE:

The Macros integrated development environment is Similar in design and function to the Visual
Studio IDE. The Macros IDE includes a code editor, tool window, the properties window and
editors.

7) ActiveX:

This technology allow to use the functionality provided by other applications such as Microsoft
word processor, Microsoft Excel spreadsheet, and other windows application.

8) Internet Access:

Internet Access capabilities make it easy to provide access to documents and applications
across the Internet or Intranet from within your applications or to create Internet server applications.

Introduction to VB B.C.A Semester III: Visual Programming 5


4 Explain the menu bars.

The menu bar contains the commands we need to work with VB. There are thirteen basic
menu are available.

Few of them are mentioned below: File, Edit, View, Project, Format, Debug, Run, Query,
Diagram, Tools, Add-Ins, Window and Help.

 File: File contains the commands which could operate on project rather on single tile. The
commands such as new, save and save as etc... to use with projects.
A command for making executable file of the selected project which could be easily
run as normal Exe file.

 Edit: It contains editing commands like copy, paste and undo plus a number of
commands for formatting and editing your code like find and Replace.

 View: It contains commands for showing or hiding components of VB IDE.

 Project: It contains commands that add components to the current project, references
windows objects and new tools on the toolbox.

 Format: It contains commands for aligning and sizing controls on the form.

 Debug: It contains the usual debugging commands.

 Run: It contains commands that start, break and end execution of the current applications.

 Tools: It contains tool you need in building ActiveX components and ActiveX controls.
It contains the commands to start the Menu Editor to Build your own Menus in your
Application and Option Commands

 Add-Ins : It contains Add-Ins that you add remove needed. By default only the visual
data manager Add-Ins is installed that lets you create small data base application with the
visual basic data manager.

 The other Menu like Window and Help are similar to any other Microsoft Applications.

Introduction to VB B.C.A Semester III: Visual Programming 6


5 Explain Toolbox Window:

The Tool box contains the icons of the controls you can place on a form to create
the application's User Interface.
By default, the Toolbox contains the pointer icon and the icons of 20 ActiveX controls

 Pointer
The pointer is not a control but can be used with the controls on the form i.e. resize, move
them etc.

 PictureBox
This control is used to display images. The images are set with the picture property of
this control.

 Label
This control is used to display text that the user cannot edit it. The text is set with the
caption property of this control. Normally this control is used to display names, initial values at
design time and program results at run time through the code.

 TextBox
This control displays text that the user can edit. The text is set with the text property
of this control. This control normally used to accept the inputs from the user and also to display
program results to the user.

 Frame
This control is used to group the other controls. It used to draw boxes on the form
and other required controls can be placed inside this box area making a group of controls on the
form.

 CommandButton
A command button represents an action that is carried out when the user clicks the
button. Action is associated with the click event of this control in program code.

 CheckBox
This control is used to provide a choice of selection to the user. It shows a check
(or right) mark on one click and clears on another click i.e. it toggles (or changes) on every click.
The value property of this control is used to check and uncheck it.

 OptionButtons
This control also called as radio button is used to provide a choice of action to the
user. It shows a small shaded dot like circle when selected and cleared when not selected i.e.
toggles on every click. The value property is used to on and off like car radio button.

Introduction to VB B.C.A Semester III: Visual Programming 7


 ListBox
This control provides a list of text items from which the user can select one or
more. The text cannot be edited by the user, but on selection, the selected item's text can be used
to display.

 ComboBox
This control is similar to ListBox control but it contains text edit field. The user
can select an item from the list like ListBox control or enter new text in the edit field.

 Horizontal and Vertical ScrollBars


These controls similar to familiar scroll bars found in many of the applications.
These can be used to scroll the contents of controls those do not have built-in vertical and
horizontal scroll bar properties (like Picture Box, label etc) when the content is more than the
height or width on the form. For this a small program has to be written.

 Timer

This control facilitates the user to schedule certain events in the program. It has the
facility to set time intervals. The interval property of this control is set to schedule the events.

 Shape
This control is used to draw graphical elements, such as rectangles, circles, and squares
on the form.

 Line
Similar to the shape control, the line control can be used to draw the straight lines on the
form.

 File system related controls


Three controls namely, DrivelistBox, DirectoryListBox. and FileListBox are extending
the users ability to handle file system of the system.

 DrivelistBox
This control displays the drives on the system in a drop-down list form. The user can
select any drive from the list.
 DirectoryListBox
This control displays a list of all folders in the current drive and lets the user move up or
down in the hierarchy of the folders.
 FileListBox
This control displays a list of all files in the current folder or directory.

Introduction to VB B.C.A Semester III: Visual Programming 8


 Image
This control can be used to display image. This control is similar to the Picture Box
control but has minimum number of facilities than the Picture Box control.

 Data
This control is used to connect databases. This has many properties and methods to
facilitate data access.

 OLE
This control can be used to interact with the other windows applications such as MS
word or Excel etc. Through this control you can access the functionality of other application as
if you are working with in that application.

Introduction to VB B.C.A Semester III: Visual Programming 9

You might also like