[go: up one dir, main page]

0% found this document useful (0 votes)
17 views36 pages

VB45 Unit-1

Visual basic notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views36 pages

VB45 Unit-1

Visual basic notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 36

SEM: V CLASS: III-B.Com.

CA
SUB: VISUAL BASIC

UNIT - IV
Function Procedures – Sub Procedures – Advanced Uses of Procedures and Functions – Lists: One–
Dimensional Arrays – Arrays with more than One–Dimension - Using Lists and Arrays with
Functions and Procedures – The With Statement - Enums – Control Arrays – List and Combo Boxes
– Menus – Menu Editor – MDI Forms
THE ANATOMY OF A PROCEDURE:
The procedure or Subroutine is the piece of code that gets executed when the control that it
is associated with senses an event. The event means mouse click, mouse move or method invoked by
the code.
Parts of a Procedure or Subroutine:
A procedure consists of the following things:
1. Name
2. Declaration Area
3. Statements
4. Call to Other procedures and/or functions.
5. Terminator.
1. Name:
Every procedure must have a name. The name of a procedure is usually tied to the control.
You can have a procedure called cmdExit_clcik(). This means that this procedure will be executed
against the “Click” event of the “cmdExit” button. The “Sub” before the name means that the
procedure is a Subroutine.

2. Declaration Area:
This area is used to declare all the variables, constants etc. However it is considered a good
idea to declare the entire variable at the beginning of the procedure. This makes it easy to locate
variables and verify the same during the process of debugging.

3. Statements:
The procedure deals with basic execution. Procedure will contain VBA (Visual Basic
Application) statements (or code if you like) that will perform the intended task. A procedure can
have as many statements as you care to add but keeping your procedures short and simple will
render them easy to debug.

4. Call to other Procedures and/or Functions:


One way of reducing the number of lines in a procedure is to break up the entire activity into
smaller functions or procedures that can be called as and when required. Therefore, if a particular
task has to be performed by more than one event that task can be written as and when required.
The principle used here is “Write once use many times”. A call to another procedure or
function is not a must for every procedure.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 1


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

5. Terminator:
All good things come to an end. Every procedure (subroutine in the case) is terminated by the
“End Sub” statement.

Introduction to Procedures:
We can simplify programming tasks by breaking programs into smaller logical components. These
components — called procedures — can then become building blocks that let us to enhance and
extend Visual Basic.
Procedures are useful for condensing repeated or shared tasks, such as frequently used calculations,
text and control manipulation, and database operations.
There are two major benefits of programming with procedures:
 Procedures allow breaking our programs into discrete logical units, each of which we can
debug more easily than an entire program without procedures.
 Procedures used in one program can act as building blocks for other programs, usually with
little or no modification.
There are several types of procedures used in Visual Basic:
 Sub procedures do not return a value.
 Function procedures return a value.
 Property procedures can return and assign values, and set references to objects.

In order to add a Procedure in our program,


1. The code window is opened for the module to which the procedure is to be added.
2. Add Procedure is chosen from the Tools menu, which opens an Add Procedure dialog
box shown below.
3. The name of the procedure is typed in the Name Textbox.
4. Under Type, Sub is selected to create Sub Procedure, Function to create a Function
Procedure, or Property to create a Property Procedure.
5. Under scope, public is selected to create a procedure that can be invoked from outside
the module, or private to create a procedure that can be invoked only from within the
module.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 2


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

FUNCTION PROCEDURES
Visual Basic includes built-in, or intrinsic functions, like Sqr, Cos or Chr.
In addition, we can use the Function statement to write our own Function procedures.
The syntax for a Function procedure is:
[Private|Public][Static]Function procedurename (arguments) [As type]
statements
End Function
Like a Sub procedure, a Function procedure is a separate procedure that can take arguments, perform
a series of statements, and change the value of its arguments. Unlike a Sub procedure, a Function
procedure can return a value to the calling procedure. There are three differences between Sub and
Function procedures:
 Generally, we can call a function by including the function procedure name and arguments
on the right side of a larger statement or expression (return value = function()).
 Function procedures have data types, just as variables do. This determines the type of the
return value. (In the absence of an As clause, the type is the default Variant type.)
 We can return a value by assigning it to the procedure name itself. When the Function
procedure returns a value, this value can then become part of a larger expression.
For example, we can write a function that calculates the third side, or hypotenuse, of a right triangle,
given the values for the other two sides:
Function Hypotenuse (A As Integer, B As Integer) As String
Hypotenuse = Sqr(A ^ 2 + B ^ 2)
End Function
We can call a Function procedure the same way we call any of the built-in functions in Visual Basic:
Label1.Caption = Hypotenuse(CInt(Text1.Text), CInt(Text2.Text))
strX = Hypotenuse(Width, Height)

Example: (Function)
Public Function Sum(n1 As Integer, n2 As Integer) As Integer
Sum=n1+n2
End Sub
The function “Sum” called anywhere in the program. It can be called by simply passing the variables
to it as arguments. Consider the following event procedure.

Event Procedure:
Private Sub CmdFun1_Click()
Dim M1 As Integer
Dim M2 As Integer
Dim Tot As Integer
M1=val(Text1.Text)
M2=val(Text1.Text)
Tot=Sum(m1,m2)
End Sub

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 3


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

SUB PROCEDURES
A Sub procedure is a block of code that is executed in response to an event. By breaking the code in
a module into Sub procedures, it becomes much easier to find or modify the code in our application.
The syntax for a Sub procedure is:
[Private|Public][Static] Sub procedure name (arguments)
Statements
End Sub

Each time the procedure is called, the statements between Sub and End Sub are executed. Sub
procedures can be placed in standard modules, class modules, and form modules. Sub procedures are
by default Public in all modules, which means they can be called from anywhere in the application.

Example:
In this example, we create a sub procedure to sum up two values that are specified by the arguments
The main program can reference a procedure by using its name together with the arguments in the
parentheses.
Private Sub cmdCal_Click()
Dim x As Single, y As Single
x = Val(TxtNum1.Text)
y = Val(TxtNum2.Text)
sum x, y
End Sub

Sub sum(a As Single, b As Single)


MsgBox ("sum=" & a + b)
End Sub
Running the program produces a message boxes as shown in Figure.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 4


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

Differentiate Subroutines and Functions


SUBROUTINES (OR) PROCEDURES FUNCTIONS
Subroutines are procedures that are executes as a
Functions are procedures that are executed as a
unit of code. unit of code
Subroutines will not return any value to the Function will return a value to the calling program
calling program. and can therefore be used as a variable in order to
return a value.
The subroutine declared with “Sub” keyword and The Function declared with the “Function”
terminated with “End Sub” statement. keyword and terminated with the “End Function”
statement.

ADVANCED USES OF PROCEDURES AND FUNCTIONS


1. Calling Procedures:
The techniques for calling procedures vary, depending on the type of procedure, where it's located,
and how it's used in your application. The following sections describe how to call Sub Function and
procedures.

2. Calling Sub Procedures:


A Sub procedure differs from a Function procedure in that a Sub procedure cannot be called by
using its name within an expression. A call to a Sub is a stand-alone statement. Also, a Sub does not
return a value in its name as does a function. However, like a Function, a Sub can modify the values
of any variables passed to it.
There are two ways to call a Sub procedure:

' Both of these statements call a Sub named MyProc.


Call MyProc (FirstArgument, SecondArgument)
MyProc FirstArgument, SecondArgument

Note that when we use the Call syntax, arguments must be enclosed in parentheses. If we omit the
Call keyword, we can also omit the parentheses around the arguments.

3. Calling Function Procedures:


Usually, we call a function procedure we've written our self the same way we call an intrinsic Visual
Basic function like Abs; that is, by using its name in an expression:

' All of the following statements would call a function


' named ToDec.

Print 10 * ToDec
X = ToDec
If ToDec = 10 Then Debug.Print "Out of Range"
X = AnotherFunction(10 * ToDec)

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 5


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

It's also possible to call a function just like we would call a Sub procedure. The following statements
both call the same function:

Call Year(Now)
Year Now

When you call a function this way, Visual Basic throws away the return value.

4. Calling Procedures in Other Modules:


Public procedures in other modules can be called from anywhere in the project. We might need to
specify the module that contains the procedure we're calling. The techniques for doing this vary,
depending on whether the procedure is located in a form, class, or standard module.

5. Procedures in Forms(or Form Modules):


All calls from outside the form module must point to the form module containing the procedure. If a
procedure named SomeSub is in a form module called Form1, then we can call the procedure in
Form1 by using this statement:

Call Form1.SomeSub(arguments)

6. Procedures in Class Modules:


Like calling a procedure in a form, calling a procedure in a class module requires that the call to the
procedure be qualified with a variable that points to an instance of the class.
For example, DemoClass is an instance of a class named Class1:

Dim DemoClass as New Class1


DemoClass.SomeSub
However, unlike a form, the class name cannot be used as the qualifier when referencing an instance
of the class. The instance of the class must be first be declared as an object variable (in this case,
DemoClass) and referenced by the variable name.

7. Procedures in Standard Modules:


If a procedure name is unique, we don't need to include the module name in the call. A call from
inside or outside the module will refer to that unique procedure. A procedure is unique if it appears
only in one place.

If two or more modules contain a procedure with the same name, we may need to qualify it with the
module name. A call to a common procedure from the same module runs the procedure in that
module. For example, with a procedure named CommonName in Module1 and Module2, a call to
CommonName from Module2 will run the CommonName procedure in Module2, not the
CommonName procedure in Module1.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 6


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

A call to a common procedure name from another module must specify the intended module. For
example, if you want to call the CommonName procedure in Module2 from Module1, use:

Module2.CommonName(arguments)

8. Passing Arguments to Procedures:


Usually the code in a procedure needs some information about the state of the program to do its job.
This information consists of variables passed to the procedure when it is called. When a variable is
passed to a procedure, it is called an argument.

9. Argument Data Types:


The arguments for procedures we write have the Variant data type by default. However, we can
declare other data types for arguments. For example, the following function accepts a string and an
integer:

Function WhatsForLunch(WeekDay As String, Hour As Integer) As String


' Returns a lunch menu based on the day and time.

If WeekDay = "Friday" then


WhatsForLunch = "Fish"
Else
WhatsForLunch = "Chicken"
End If
If Hour > 4 Then WhatsForLunch = "Too late"
End Function

10. Passing Arguments By Value:


Only a copy of a variable is passed when an argument is passed by value. If the procedure changes
the value, the change affects only the copy and not the variable itself. Use the ByVal keyword to
indicate an argument passed by value.

For example:
Sub PostAccounts(ByVal intAcctNum as Integer)
.
. ' Place statements here.
.
End Sub

11. Passing Arguments By Reference:


Passing arguments by reference gives the procedure access to the actual variable contents in its
memory address location. As a result, the variable's value can be permanently changed by the
procedure to which it is passed. Passing by reference is the default in Visual Basic.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 7


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

If we specify a data type for an argument passed by reference, we must pass a value of that type for
the argument. we can work around this by passing an expression, rather than a data type, for an
argument. Visual Basic evaluates an expression and passes it as the required type if it can.
The simplest way to turn a variable into an expression is to enclose it in parentheses. For example, to
pass a variable declared as an integer to a procedure expecting a string as an argument, you would do
the following:

Sub CallingProcedure()
Dim intX As Integer
intX = 12 * 3
Foo(intX)
End Sub

Sub Foo(Bar As String)


MsgBox Bar 'The value of Bar is the string "36".
End Sub

12. Using Optional Arguments:


We can specify arguments to a procedure as optional by placing the Optional keyword in the
argument list. If we specify an optional argument, all subsequent arguments in the argument list
must also be optional and declared with the Optional keyword. The two pieces of sample code below
assume there is a form with a command button and list box.
For example, this code provides all optional arguments:
Dim strName As String
Dim strAddress As String

Sub ListText(Optional x As String, Optional y _


As String)
List1.AddItem x
List1.AddItem y
End Sub

Private Sub Command1_Click()


strName = "yourname"
strAddress = 12345 ' Both arguments are provided.
Call ListText(strName, strAddress)
End Sub

This code, however, does not provide all optional arguments:

Dim strName As String


Dim varAddress As Variant

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 8


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

Sub ListText(x As String, Optional y As Variant)


List1.AddItem x
If Not IsMissing(y) Then
List1.AddItem y
End If
End Sub

Private Sub Command1_Click()


strName = "yourname" ' Second argument is not
' provided.
Call ListText(strName)
End Sub
In the case where an optional argument is not provided, the argument is actually assigned as a
variant with the value of Empty. The example above shows how to test for missing optional
arguments using the IsMissing function.

13. Providing a Default for an Optional Argument:


It's also possible to specify a default value for an optional argument. The following example returns
a default value if the optional argument isn't passed to the function procedure:

Sub ListText(x As String, Optional y As Integer = 12345)


List1.AddItem x
List1.AddItem y
End Sub

Private Sub Command1_Click()


strName = "yourname" ' Second argument is not provided.
Call ListText(strName) ' Adds "yourname" and "12345".
End Sub

LISTS: ONE–DIMENSIONAL ARRAYS


What is Array?
A group of values can be stored in a single variable name with same data type is known as
array. Each array variable is known as array element. Array elements are referred by its subscripts.
Subscripts are always be a positive integer number.
Syntax:
Dim Array_VarName [(subscript)] As [New] type [,VarName…]

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 9


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

Example 1:
Dim Num(5) As Integer
 “Num” is the set of 6 integers.
 Nums(0) is the first element.
 Nums(5) is the sixth and the last element.
The numbers inside the parentheses of the individual variables are called subscripts, and each
individual variable is called a subscripted variable or element. The elements of an array are assigned
successive memory locations. The following figure shows the memory location for the array Num(5)

Example 2:
Dim X(10 To 20) As Integer
“X” is the set of 11 integers.
X(10) is the first element.
X(20) is the eleventh and the last element.

What are the types of Array?


Types of Array:
Two types of arrays:
1. One Dimensional Array Only One Subscript
2. Multi-Dimensional Array (or) Arrays with more than one dimension  More
than one Subscript

ONE-DIMENSIONAL ARRAYS:
Declaring Fixed Size Arrays:
The scope of the array will depend upon the method of declaration.
1. To create a local array, use the Dim statement in a procedure to declare the array.
Dim Sum(10) As Single
2. To create a Module array, use the Private statement in the Declaration section of a
module to declare the array.
Private Ser(10) As Single
3. To create a Public array, use the Public statement in the Declaration section of a form.
Public Sun(10) As Single
4. In the case of fixed – size array it is compulsory to enter the upper bound of the array in
the parenthesis.
5. The upper bound is the upper limit for the size of the array.

A declaration such as the following:


Example 1:
Private Counter(10) As Integer
 The Counter array contains 11 elements.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 10


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

To specify the lower bound of an array, provide it explicitly (as a long data type) using the TO
keyword.
Dim Counter(1 to 10) As Integer
 In the above declaration, the index numbers of counter range from 1 to 10. The LBound is a
function that returns the lower bound of an array.

Example
Dim X As Integer
Dim SinX(24) As Integer
X=Lbound(SinX)
Debug.Print X

ARRAYS WITH MORE THAN ONE–DIMENSION


Multi-Dimensional Array:
Arrays can have more than one dimension. A table of data will be represented by a
multidimensional array.
Example 1:
Dim Sales(11,2) As Integer
 Here the Subscript 11 indicates the Months and the subscript 2 indicates the departments. This
is a two dimensional array.
Example 2:
Dim Sales(11,2,4) As Integer
 Here the Subscript 11 indicates the Months, the subscript 2 indicates the departments and the
subscript 4 indicates the products. A multi-dimensional array takes up a lot of space.

Dynamic Arrays:
Dynamic arrays are used when the user doesn’t know the number of elements of an array.
Advantages:
1. A dynamic array can be resized at any time and this helps us to manage memory
efficiently.
2. We can use a large array for a short time and then a free memory to the system when
we are no longer using the array.
3. We can increase the size of the array after having declared a smaller array.
ReDim: ReDim is used to declare the array as dynamic by giving it an empty dimension list.
Declaring a Dynamic Array:
We declare the array as dynamic by giving it an empty dimension list
Dim a()
Use the ReDim statement to allocate the actual number of elements.
ReDim a(11,4)
Example:
Dim a() As Integer

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 11


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

This statement will create an open –ended array


ReDim a(12,6)
This will create a two-dimensional array.
The values for the subscript of the array can be passed using variables.
Example:
Dim a() As Integer
Dim Months As Integer
Dim Depts As Integer
Months = 12
Depts = 4
ReDim a(Months, Depts)

ReDim Statement: The ReDim statement is used at procedure level to relocate storage space for
dynamic array variables.
Syntax:

ReDim [ Preserve] Var_Name(Subscript)[As type]


Preserve is a keyword to preserve the data in an existing array when we change the size of the last
dimension.
VarName is the name of the variable.
Subscript is the dimension of an array variable.
Type is the data type of the variable.

More on ReDim:
Only the upper bound of the last dimension in a multidimensional array can be changed when we use
the Preserve keyword. If we change any other dimension, a run-time error will occur.
Example:
Dim a(11,2,4) As Integer
It can be resized using the Preserve keyword.
Example:
This example uses the ReDim statement to allocate and reallocate storage space for dynamic
array variables.
Private Sub Form_Load()
Dim a() As Integer
ReDim a(5)
For i= 1 to 5
a(i)= i
Next i
End Sub

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 12


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

THE WITH STATEMENT


It executes a series of statements, making repeated reference to a single object or structure.
With object
[Statements]
End With
Object: [Required] Variable or expression. Can evaluate to any data type, including elementary
types.
Statements: [Optional] One or more statements between With and End With that run on object.
End With: [Required] Terminates the definition of the With block.
Example:
With yourname
.Name=”howard’
.Salary=100000
.Socsec=”036-78-9987”
End With

ENUMS
An enumeration, or Enum , is a symbolic name for a set of values. Enumerations are treated as
data types, and we can use them to create sets of constants for use with variables and properties

Declare Enum
An Enum type has a name, an underlying type, and a set of fields, each representing a constant.
The name must be a valid Visual Basic qualifier. The underlying type must be one of the integer
types—Byte, Short, Long or Integer. Integer is the default.
Example:
Public Enum Days
Sunday=1
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
End Enum

VB automatically assigns successive integer to the days of the week.


Monday=2
Tuesday=3 and so on.

The benefits of using enumerations include:

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 13


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

 Reduces errors caused by transposing or mistyping numbers.


 Makes it easy to change values in the future.
 Makes code easier to read, which means it is less likely that errors will creep into it.
 Ensures forward compatibility.

CONTROL ARRAYS
Array is the collection of similar elements. Control Array is nothing but, collection of similar
controls. These controls are the elements of the Control array, which share the common properties.
There are three ways to create control arrays in Visual Basic, are
 Using CTRL+C, CTRL+V to copy an existing control from one place on the form to another
 Using the same control name for the controls in the form, more than once while designing a
visual basic application.
 Using the index property of the controls
Working with a Control Array
Change procedure of a control present in the control array is different from the change procedure of
the ordinary control. The Change procedure of the control Array will have index as parameter. This
parameter is the key to the smooth functioning of control arrays.
Adding and Removing Controls in a Control Array
We can inadvertently add a control to a control array at design time; we can also remove it by
changing the control name or deleting the control at design time. The nifty part is that once
we’ve created array at design time, we can add controls while the application is running. To do
this, we use a method called Load
The Syntax for Load method is
Load ControlArrayName (Index)
Suppose we want to add three textboxes in the control array at run time, where there is a textbox
already created at run time. We have to write the following code to the form_load event procedure to
add three textboxes at runtime.
Private Sub Form_Load()
Dim I As Integer
Const Spacing = 10
Text1(0).Move 0, 0
Text1(0).Text = "Text box in control Array #0"
Text1(0).Width = TextWidth(" Text box in control Array # 0 ")
For I = 1 To 3
Load Text1(I)
Text1(I).Text = "Text box in control Array #" + Str(I)
Text1(I).Width = TextWidth(" Text box in control Array # " + Str(I))
Text1(I).Move 0, Text1(I - 1).Top + Text1(I - 1).Height + Spacing
Text1(I).Visible = True
Next I
End Sub

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 14


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

At run time, we have to set the Visible property of the new control to true or else the new elements
will not appear on the form. We should properly position the controls in the form using the Move
method, this means that the newly created controls in a control array default to being stacked one on
top of the other.

The UnLoad Method is used to remove the controls from the control Array at run time
The Syntax of the UnLoad method is
UnLoad ControlArrayName(Index)
The following code will remove the text boxes from the control array which are created during run
time.
Private Sub Form_Click()
Static J As Integer
If J < 3 Then
Unload Text1(J + 1)
J=J+1
Else
Exit Sub
End If
End Sub

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 15


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

LIST AND COMBO BOXES


List boxes contains list of items
The combo boxes allow users to input data as well as make choices from a list.
ListBox and ComboBox controls present a set of choices that are displayed vertically in a single
column.
If the number of items exceed the value that can be display, scroll bars will automatically appear on
the control. These scroll bars can be scrolled up and down or left to right through the list.

Adding items to a list


It is possible to populate the list at design or at run time.
1. Design Time: To add items to a list at design time, click List in the property box and then
add the items. Press CTRL + ENTER after adding each item.
We can track the total number of items in a list box using ListCount property.
2. Run Time: The AddItem method is used to add items to a list at run time. The AddItem
method uses the following syntax:
List1.AddItem (item), Index
The item argument is string that represents the text to add to the list.
The index argument is an integer that indicates where in the list to add the new item.
addItem method is written as:
Private Sub Form_Load()
List1.AddItem (“Item 1”)
List1.AddItem (“Item 2”)
List1.AddItem (“Item 3”)
List1.AddItem (“Item 4”)
List1.AddItem (“Item 5”)
List1.AddItem (“Item 6”)
End Sub

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 16


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

Removing Items from a List


The RemoveItem method is used to remove an item from a list. The syntax for this is given below.
Object.RemoveItem.index

Sorting the List


To sort the list set Sorted property to True at runtime or design time.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 17


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

Selecting an Item from a list


 To access the items in a listbox we use the ListIndex and List properties.
 The list index property sets the index number of the currently selected item.
 The first item in the list having index number 0.
 ListIndex return -1 if no item is selected. The ListCount return total number of items in
listbox.

Using ComboBox
A Combo Box combines the features of Textbox. This control enables the user to select either by
typing text into combo box or by selecting an item from list.
There are three types of Combo Box styles that are given below.
1. Dropdown Combo (style 0)
2. Simple Combo (style 1)
3. Dropdown list (style 2)

We select which type we want with the combo box Style property

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 18


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

A combo box is a combination of a text box and list box, so that at design time, we can change the
text in the text box part by changing the Text property.
At run time we add items in the combo box using AddItem method
Example:
Private Sub Form_Load()
cmb1.AddItem "test1"
cmb1.AddItem "test2"
cmb1.AddItem "test3"
End Sub

Events of combo box:


There are two main events of combo box: Click and Dblclick.

Remove items from combo box:

Sorting combo box:

Clearing a combo box:

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 19


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

MENUS
Creating and managing menu at Design Time:
Visual Basic applications can be enhanced by adding menus to it. It offers a convenient and
consistent way to group commands and easy way for users to access them.

The menu bar appears appear below the title bar and it may contain one or more menu
titles. When a menu title is clicked it displays a set of menu items under that title. Each menu
item corresponds to a menu control that is defined in a menu editor and performs a specific
action.

MENU EDITOR
A menu editor can be used to add new commands to the existing bars. A menu editor can be added
only after opening a project. To display a menu editor command is chosen from the Tools menu or
menu editor button is clicked in the tool bar.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 20


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

1. Caption: This is the name that the user will see.


2. Name: This is the name that the programmer uses , we use the mnu prefix for all
menu items(mnuFile).
Shortcut: this assigns a shortcut to a menu item this is a combination of keys which access a
menu item for example Ctrl + c is commonly used for copy
3. Checked: this allows the programmer to place a check beside a menu item , this is
unchecked by default.
4. Enabled: This specifies whether the menu item is accessible to the user , if this is checked
the menu item is grayed out and inaccessible.
5. Visible: this determines whether the menu item is visible if this is not checked then the menu
item will not appear at run time.
6. Window List: determines whether the menu item applies to an MDI document (Word and
Excel are examples of MDI applications).
7. HelpContextID: this matches a help description if you have any in your program.
8. Index: this specifies a menus index in a control array.

Writing Code form menu Control


Each menu control has click event, which is execute when the menu item is selected or
clicked. The following code is entered in the code window for green color option of menu.
Private sub grn_Click()
Form1.backcolor= QBcolor(2)
Grn.Enabled = False
Blue.Enabled = True
Red.Enabled = True
End sub
When the green color is selected by clicking on it, form backcolor will be change into green color
and that green option form menu is make disable and to other’s enable.

Adding a Separator Bar and Shortcut key.


Separator bar is a line that separates the menu items, which is mainly useful for obtaining clarity. To
add it in menu, Right click on the form select menu editor
Place the pointer where you want to insert separator
In the caption TextBox ‘-‘ is typed and give any name

Using Access and Shortcut keys


Access keys allow the user to open a menu by pressing the Alt key with a letter key. To open the
Edit menu in all Windows applications, for e.g. you can press Alt-E. .
Access key is designed by the programmer and they are marked with an underline character. To
assign Access key to menu item, add & sign before letter. e.g. “&File”.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 21


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

Shortcut Keys
Shortcut keys are similar to access key has a special meaning in menu design, but inside a opening
menu, they run a command when pressed. To assign a shortcut key to a menu command, dropdown
the shortcut list in the menu editor and select a keystroke.

Sample Menu Editor:


Open a new Project and save the form as menu.frm and save the project as menu.vbp.
Choose Tools ››› Menu Editor and type the menu items as shown below.
Caption Name
File mnuFile
Open mnuOpen
Save mnuSave
Exit mnuExit
Edit mnuEdit
Copy mnuCopy
Cut mnuCut
Paste mnuPaste

Run the application by pressing F5. We can see that you can select a menu

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 22


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

MDI FORMS:
 MDI stands for Multiple Document Interface.
 The Multiple Document Interface (MDI) was designed to simplify the exchange of
information among documents.
 Each document is displayed in its own window, and all document windows have the same
behavior.
 The main Form, or MDI Form, isn't duplicated, but it acts as a container for all the windows,
and it is called the parent window.
 The windows in which the individual documents are displayed are called Child windows.
 An MDI application must have at least two Form, the parent Form and one or more child
Forms. Each of these Forms has certain properties.
 There can be many child forms contained within the parent Form, but there can be only one
parent Form.
 The parent Form may not contain any controls.
 While the parent Form is open in design mode, the icons on the ToolBox are not displayed,
but can't place any controls on the Form.
 The parent Form usually has its own menu.
To create an MDI application, follow these steps:
1. Start a new project and then choose Project >>> Add MDI Form to add the parent Form.
2. Set the Form's caption to MDI Window
3. Choose Project >>> Add Form to add a SDI Form.
4. Make this Form as child of MDI Form by setting the MDI Child property of the SDI Form to
True. Set the caption property to MDI Child window.

Restrictions of the MDI form


 Can have only one MDI form per project.
 Can't place most controls on an MDI form.
 The only controls that can be placed on the surface of the MDI form are Menus, Timer,
CommonDialog, PictureBox, ToolBar, and StatusBar.
 These restrictions are there because MDI forms are the special type of forms, especially used
to handle multiple child forms.
Restrictions of the MDI child forms:
1. Can't display an MDI child form outside its parent.
2. Can't display a menu bar on the MDI child form.

How does the MDI form work:


 There can be only one MDI parent form in a project with one or more MDI child forms (or
simply child forms).
 The parent form contains a menu bar on top of it.
 From there, the user opens or creates a new document.
 In this way, the user accomplishes his/her work in one or multiple documents, then saves and
closes the document (form).

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 23


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

Following example illustrates the above explanation.


* Open a new Project and name the Form as Menu.frm and save the Project as Menu.vbp
* Design a menu that has the following structure.
<> MDIMenu Menu caption
 MDIOpen opens a new child Form
 MDIExit terminates the application
* Then design the following menu for the child Form
<> ChildMenu Menu caption
 Child Open opens a new child Form
 Child Save saves the document in the active child Form
 Child Close Closes the active child Form
At design time double click on MDI Open and add the following code in the click event of the open
menu.
Form1.Show
And so double click on MDI Exit and add the following code in the click event
End
Double click on Child Close and enter the following code in the click event
Unload Me
Before run the application in the project properties set MDI Form as the start-up Form. Save and run
the application. Following output will be displayed.

When we click MDI Open we can notice that the main menu of the MDI Form is replaced with the
Menu of the Child Form.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 24


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

UNIT – V
Introduction to Database - Working with Data Control: The Data Control - The Bound Control –
Coding – Data Access Object: Functions of the Jet Database Engine – The DAO Object Model -
Crystal and Data Reports: Crystal Report - Data Report – Creating Multiple Reports

INTRODUCTION TO DATABASE
Definitions:
 Database
"A set of data related to a particular topic or purpose. A database contains tables and can
also contain queries and table relationships, as well as table and column validation
criteria."
 Table
"A table is a collection of data, arranged in rows and columns. For example, you might
have a table for author information called authors. Each column would contain a certain
type of information, such as the author's last name. Each row would contain all the
information about a specific author: first name, last name, address, and so on."
 Recordset
A recordset is an object that contains a set of records from the database. There are mainly
five types of Recordset object.
1. Table-Type Recordset: The table type recordset object is a set of records that
represents a single table can be used to add, change or delete records. They are
fastest type of Recordset.
2. Dynaset-Type Recordset: The dynaset-type recordset object is a set of records
that represent a table, or attachment tables, or the results of queries containing
fields from one or more tables. A dynaset enables us to update data from more
than one table.
3. Snapshot-Type Recordset: the snapshot type recordset can refer any table,
attached table or query. A snapshot cannot be updated and does not reflect
changes to data made by the users.
4. Dynamic type Recordset: This recordset type represent a query result set from
one or more base tables in which we can add, change or delete records from a row
returning query. Further, records that other users add, delete, or edit in the base
tables also appear in our recordset. This type is only available in ODBCDirect
workspace, and corresponds to an ODBC dynamic cursor.
5. Forward Only Type recordset: This recordset type is identical to a snapshot
except that we can only scroll forward through its records. This improves
performance in situations where only need to make a single pass through a result
set. In an ODBCDirect workspace, this type corresponds to an ODBC forward-
only cursor.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 25


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

VB Data Control:
VB provides two controls which makes the link to the database file and which creates the
recordset that is exposed to the rest of the controls in your application. The two are identical in
concept but differ in the flexibilty they offer to the programmer.
1. Data control:
This is the original, intrinsic version of the control. It supports the JET database engine
and can satisfy most beginners' needs.
2. ADO Data control:
This is the latest version of the data control, implemented as an ActiveX control.

WORKING WITH DATA CONTROL: THE DATA CONTROL


1. Create a database using MSAccess, Oracle or Sql server named st_detail and a table
2. Student table having fields (name, roll no, class).
3. Start a new Standard EXE project and design a Form that looks like

4. Start by drawing a Data control at the bottom of the Form. The Data control is your
gateway to the database.
5. With the Data control selected, locate its DatabaseName property, and set the path to
st_detail database.
6. Locate the RecordSource property in the Properties window, and drop down the list of
available entries. You’ll see a list of all the tables in the st_detail database. Select the
student table.
7. Place three textboxes on the Form.
8. Select the first textbox, and in the Properties window locate its DataSource property. Set
it to Data1.
9. Set the DataField property of the textbox to Name. The DataField property is a drop-
down list with the names of all fields in the student table.
10. Set the DataSource property of the other textboxes to Data1, and set the DataField
property to Roll No, and Class.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 26


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

Now run the application. The textboxes will display the values of the corresponding fields of the
student table. Using the Data control’s buttons, you can move through the records (rows) of the
table. Clicking the leftmost button displays the first record of the table, and clicking the button
next to it displays the previous record. Clicking the rightmost button displays the last record of
the table, and clicking the button next to it displays the next record.

THE BOUND CONTROL


The Data-Bound Controls: You can bind certain controls to the data control, the remote data control,
and the ADO data control, and those controls are called bound controls. To bind a control to a database
control, you use properties like DataSource to specify the database control, and then use properties like
DataField or BoundColumn to specify what field to display in the bound control, as we’ll see. Here are
the controls that can function as bound controls:

• Picture boxes
• Labels
• Text boxes
• Checkboxes
• Image controls
• OLE controls
• List boxes
• Masked edit controls
• Rich text boxes
• Combo boxes

In addition, there are special controls that are designed to be used as bound controls:
• DBList
• DBCombo
• FlexGrid
• MSFlexGrid

Finally, a number of bound controls are specially built to be used with the ADO control only:
• DataList
• DataCombo
• DataGrid

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 27


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

DATA ACCESS OBJECT: FUNCTIONS OF THE JET DATABASE ENGINE


 DAO (Data Access Objects) is an application program interface (API) available with Microsoft's
Visual Basic that lets a programmer request access to a Microsoft Access database. DAO was
Microsoft's first object-oriented interface with databases.
 Previous versions of VB used the Data Access Object Control: DAO.
 DAO is/was particularly good for MSAccess and MS-SQL-Server databases.
 DAO has limitations in dealing with nonMicrosoft databases.
DAO connections:

DAO objects encapsulate Access's Jet functions. Through Jet functions, it can also access other Structured
Query Language (SQL) databases.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 28


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

Objects in DAO object model


The following are the various objects in DAO object model.

Each object contains collections, methods and properties.


1. A collection is a collection of objects of the same type.
2. A method performs an operation on the object.
3. A property contains a single attribute of the object.

The DBEngine is the highest-level object in the DAO object model. It contains all other objects and
collections. The Database object is the member of the Databases collection of the default Workspace
object, which is a member of the Workspaces collection of the DBEngine object.

With DAO, objects you use to work with the data in the database are generally not saved but are created
every time you need them. Objects that represent the structure of the database are saved with the database.
When you create a new DAO object to be saved in the database, you have to append it to the appropriate
collection using the collection's Append method. Keep in mind that all DAO objects are indexed
beginning with zero.

DAO lets you work with three database formats:


Microsoft Jet (all databases that are created with the Microsoft Jet database engine)
Installable ISAM format
ODBC data sources

Jet and ISAM data use the Microsoft Jet object model; however, with ODBC data, you can use either
Microsoft Jet or ODBCDirect. There are some limitations in accessing ODBC data using Jet, although
you can use it if you need to take advantage of a particular Jet feature. But ODBCDirect is more flexible,
allowing you to run queries or stored procedures against the backend server and perform batch updates
and asynchronous queries. It also makes your application run faster because it allows you to bypass
Microsoft Jet's middle layer.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 29


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

What is Jet Engine?


 Jet Engine is the database engine that accesses the data. Jet Engine is a collection of programs
that work together. Jet Engine makes use of some other translators to access various types of
databases. Each type of database such as dBase, FoxPro, and Paradox etc has its own translator.
These translators are to be available to access the particular type of database.
 Jet Engine can also access ODBC data sources using ODBC drivers.
 Jet Engine also has its own query engine, which is used to search, order and filter the data without
using the query engine of the database. This may be an advantage with small databases such as
MS-Access and FoxPro, but for large databases such as Oracle database, using Jet query engine
may be inefficient.
 Also remember DAO and Jet Engine are not designed for Internet or Intranet. To access data in
either
 Internet or Intranet use ADO (ActiveX data objects) with OLE DB.

DAO with Jet


Microsoft Jet objects
include TableDef, QueryDef, Field, Index, Parameter, Relation, Recordset, User, Group, Container,
and Document.

The DBEngine object contains two collections: Workspaces and Errors. The Workspaces collection is the
default collection of the DBEngine, so you don't have to refer to it explicitly. When you don't specifically
create a new Workspace object, DAO will create one for you. The setting of the DefaultType property of
DBEngine determines what type of workspace is created for Microsoft Jet or ODBCDirect. The default

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 30


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

value of this property is dbUseJet, but you can explicitly set it to dbUseODBC as the type argument of the
CreateWorkspace method.

The Workspace object defines a session for a user based on users' permissions and allows managing of
the current session. It also contains open databases and offers mechanisms for simultaneous transactions
and for securing the application. The Fields collection is the default collection for TableDef, QueryDef,
Index, Relation, and Recordset objects. Recordset objects can be of the following types: Table, Dynaset,
Snapshot, or Forward-Only.

Crystal and data reports


1. Crystal Report
 Create a new report by choosing File menu - New and the Create New Report dialog box will appear
(see picture below)

 Click on the Custom button to display the Choose Report Type and Data Type frames.
 Select the Custom Report and click on the Data File.
 Specify the location of the BIBLIO.MDB Access database.
 Select which tables from the database you want. For this example we will need the authors table
and the Title table.
 Check that the joins are correct in the Linking Export.
 Now we are ready to draw the report.
 Drag and drop the fields you want on to the report. So that it looks like the report above.
 Now if you run it by selecting Print Preview, you can see what the report looks like.
 Now save the report and we have a template that now can be used in VB.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 31


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

There are many options in the Crystal Reports and as this tutorial is more of an overview I will not be going
into it. But one important thing to do is to get specific data. This is done by a selection formula (i.e. the Where
clause of a SQL statement).

The above formula will only show Authors that have had their book published in 1984.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 32


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

2.Data Reports
 We can create a Data Report. We will drag things out of the Data Environment onto a form
created for the Data Report, so make sure your Data Environment window is still available.
 On the Project menu, click Add Data Report and one will be added to your project. If this item is
not on the menu, click Components. Click the Designers tab, and choose Data Report and click
OK to add the designer to your menu.
 Set the following properties for the report:
Name: rptPhone
Caption - Phone Directory
DataSource - denPhone (your phone data environment - choose, don’t type)
DataMember - PhoneList (the table name - choose don’t type)
 Right-click the Data Report and click Retrieve Structure. This establishes a report format based on the
Data Environment.
 Note there are five sections to the data report: a Report Header, a Page Header, a Detail section, a Page
Footer, and a Report Footer. The headers and footers contain information you want printed in the report
and on each page. To place information in one of these regions, right-click the selected region, click Add
Control, then choose the control you wish to place. These controls are called data report controls and
properties are established just like you do for usual controls. Try adding some headers.
 The Detail section is used to layout the information you want printed for each record in your database.
We will place two field listings (Name, Phone) there. Click on the Name tab in the Data Environment
window and drag it to the Detail section of the Data Report. Two items should appear: a text box Name
and a text box Name (PhoneList). The first text box is heading information. Move this text box into the
Page Header section. The second text box is the actual value for Name from the PhoneList table. Line this
text box up under the Name header. Now, drag the Phone tab from the Data Environment to the Data
Report. Adjust the text boxes in the same manner. Our data report will have page headers Name and
Phone. Under these headers, these fields for each record in our database will be displayed. When done,
the form should look something like this:

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 33


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

 In this form, I’ve resized the labels a bit and added a Report Header. Also, make sure you close
up the Detail section to a single line. Any space left in this section will be inserted after each
entry.
 Click File and Save rptPhone As. Save the environment in an appropriate folder. We will now
reopen our phone database manager and attach this and the data environment to that project and
add capabilities to display the report.
Accessing the Data Report
 Reopen the phone directory project. Add a command button named cmdReport and give it a Caption of
Show Report. (There may be two tabs in your toolbox, one named General and one named DataReport.
Make sure you select from the General tools.)
 We will now add the data environment and data report files to the project. Click the Project menu item,
then click Add File. Choose denPhone and click OK. Also add rptPhone. Look at your Project Window.
Those files should be listed under Designers.
 Use this code in cmdReport_Click:
 Private Sub cmdReport_Click()
rptPhone.Show
End Sub
 This uses the Show method to display the data report.
 Save the application and run it. Click the Show Report button and this should appear:

3. Multiple Report
To create a report
 In Visual Studio, create or open a Report Server project. For more information, see Create a
Report Server Project for Visual Studio ALM.
 On the Project menu, choose Add New Item.
o The Add New Item dialog box appears.
 Choose Report Wizard, and then choose Add.
o The Report Wizard opens to the Select Data Source page.
 Choose the Tfs2010OlapReportDS shared data source, and then choose Next.
o Even though you might have installed or upgraded to TFS 2013, these names, which were
assigned to the data sources for TFS 2010 are in use.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 34


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

UNIT II
2 MARKS
1. Define: Fixed length strings
2. What is a variable?
3. Define the term project
4. What is a textbox?
5. What is a project in VB?
6. Name the four windows displayed on entering VB.
7. What is Visual Programming
8. How is Visual basic Project Saved?
9. State any four data types used in VB-Numeric, String, Date and Variant
5 MARKS
1. What are the steps used for changing the properties of VB form? Explain
2. Discuss the tools used in the toolbox.
3. Explain the methods used to save a form
4. Discuss the properties of text boxes
5. Define a form and explain the following a) Command button b) List box c) Text boxes
6. Create a student detail form in VB with details of students like name, dob, degree, address, phone. Using
labels, text boxes and command buttons to add or delete students
10 MARKS
1. Explain the various properties of Command buttons
2. Explain the data types available in Visual basic.
3. Explain the properties windows also explain the use of the form’s Properties window.
4. What is IDE? Discuss about the features of IDE?

UNIT III
2 MARKS
1. List out the relational operators
2. Write the syntax of do loop
3. What the syntax of a format function.
4. What is the purpose of the Dim Statement?
5. Write the syntax of NPV function.
5 MARKS
1. Explain the functions of if-then-else loop with example
2. Discuss any five numeric functions with example.
3. Explain the properties of rich text boxes.
4. Draw the flow diagram of for-next loop.
5. What are functions? Explain the use of the following strcmp, strlen, sqr, exp, log, abs
6. Differentiate if statement from select case statement in VB giving suitable examples and their syntax.
7. Describe the four variations of a Do…loop structure.
8. Explain the structure of select case.
9. Explain numeric and date & Time function with example.
10. Explain the Financial function used in Visual Basic
10 MARKS
1. Give an account of sub procedures
2. Discuss the various string functions.

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 35


SEM: V CLASS: III-B.Com.CA
SUB: VISUAL BASIC

3. a) Explain display information on a form with an example


b) Write notes on Project Explorer
4. Explain the various data types supported by Visual Basic
5. Explain in detail about Decision making and Loop conditionals with examples

UNIT IV
2 MARKS
1. What is procedure?
2. What is function procedure ?
3. What is sub procedure?
4. What is object browser?
5. What is sub program?
6. What is list?
7. What is array?
8. What is record?
5 MARKS
1. Write a short note on function procedures?
2. Write a short note on sub procedures?
3. Explain about object browsers?
4. Explain about user defined types?
5. Explain about one dimensional arrays?
10 MARKS
1. Explain in detail about advanced procedures and functions.
2. Explain about multi dimensional arrays.
3. Explain the new array based strings.

UNIT V
2 MARKS
1. What is database?
2. What are crystal reports?
3. What is data report?
4. What is OLE DB provider?
5. What is data report
6. What is an ActiveX control?
7. What is table?
8. What are fields?
9. What is web page?
5 MARKS
1. How do you creating a crystal report using vb?
2. How do you create a data Report?
3. Write a short note web page?
10 MARKS
1. Create a sample databases & designing a report?
2. How do you creating multiple reports in VB? Explain In detail.
3. Create a simple application programs for inventory control?
4. Explain in detail about ActiveX control?

SENGUNTHAR ARTS AND SCIENCE COLLEGE, TIRUCHENGODE 36

You might also like