54604000 visual basic projects
TRANSCRIPT
-
7/29/2019 54604000 Visual Basic Projects
1/39
Prepared By: Aneesa Shabbir Anjum
Roll No.: ____________
College: F.G. Post Graduate College for Women, Wah Cantt.
Class: 3rd Year
Supervised by: Miss Gul Naz
-
7/29/2019 54604000 Visual Basic Projects
2/39
Abstract
This thesis includes fifteen Visual Basic projects that are created by using Input
box, Message box, Conditional structure, Looping structure, and Array. I have also
uses common controls, menus, MDI forms and Dialogue boxes.
Each project includes:
Project Specification
Control and Properties
Flow chart Design view
Code view
Run view
2
-
7/29/2019 54604000 Visual Basic Projects
3/39
Declaration
It is declared that Miss Aneesa Shabbir Anjum is a bonafied student of B.A.
computer science in F.G. Post Graduate College for Women Wah Cantt. Moreover,
she has developed this thesis with her individual effort and she had attended the
entire practical in the lab regularly.
Approved by:
_________________
Miss Gul Naz
3
-
7/29/2019 54604000 Visual Basic Projects
4/39
Table of Contents
SerialNo.
Project Title PageNo.
1.Program of a calculator having addition, multiplication, division and
subtraction by using control array.5
2. Program to find outLeap Years from a century given by user. 9
3. Program to input three integers and find out maximum integer 11
4. Program to convert Fahrenheit Temperature into Celsius and vice versa 14
5.Program to print a table in a list box of an inputted number using thewhile --- wend structure
16
6.Program to enter a month and tell whether it has thirty one, thirty, twenty
nine or twenty eight days18
7. Program to display back counting from 100 to 1 21
8.Program that gets three digits number from the user and display it in
reverse order23
9.Program to gets the side of triangle in text box and display the type oftriangle
25
10.Program to get an integer from user and display whether it is prime
number or not28
11. Program to display sum of series 30
12. Program to exchange the values of two text boxes using procedure 31
13. Program to display time by using timer control 33
14. Program to print the factorial in a massage box using the function Fact 35
15.Program to calculate sum of first ten even numbers using the Do LoopWhile
37
4
-
7/29/2019 54604000 Visual Basic Projects
5/39
Project 1 Develop a project to create a calculator having addition, multiplication, division
and subtraction by using control array.
Control and Properties:
Control Control Name Property Value
Label Result Caption 0
Back Color White
Alignment 1 Right Justify
Border Style 1 Fixed Single
Command Button Num(0) Caption 0
Command Button Num(1) Caption 1
Command Button Num(2) Caption 2
Command Button Num(3) Caption 3
Command Button Num(4) Caption 4
Command Button Num(5) Caption 5
Command Button Num(6) Caption 6
Command Button Num(7) Caption 7
Command Button Num(8) Caption 8
Command Button Num(9) Caption 9
Command Button C Caption C
Command Button Exit Caption ExitCommand Button Equal Caption =
Command Button Point Caption .
Command Button Op(+) Caption +
Command Button Op(-) Caption -
Command Button Op(*) Caption *
Command Button Op(/) Caption /
5
-
7/29/2019 54604000 Visual Basic Projects
6/39
Design View:
Code View:
6
-
7/29/2019 54604000 Visual Basic Projects
7/39
Code View:
7
-
7/29/2019 54604000 Visual Basic Projects
8/39
Code View:
Run View:
The run view shows the result of 450 25 = 18.
8
-
7/29/2019 54604000 Visual Basic Projects
9/39
Project 2 Develop an application program to show leap years in given century.
Control and Properties:
Control Control Name Property Value
Textbox Result Text (Leave Blank)
Command Button Command1 Caption Leap Years
List Box List1 Caption List1
Column 4
Label Label1 Caption Enter a Century
Flow Chart:
9
Start
Input C
Cent = c
C mod4 = 0
List1 add item
Increment
C >
cent
+ 100
End
TrueFalse
-
7/29/2019 54604000 Visual Basic Projects
10/39
Design View:
Program Code:
Run View:
10
-
7/29/2019 54604000 Visual Basic Projects
11/39
Project 3 Develop an application program to input three integers and find out maximum
integer.
Control and Properties:
Control Control Name Property Value
Label Label1 Caption Enter First Value
Label Label2 Caption Enter Second Value
Label Label3 Caption Enter Third Value
Text Box Text1 Text (Leave Blank)
Text Box Text2 Text (Leave Blank)
Text Box Text3 Text (Leave Blank)
Command Button Command1 Caption Maximum Number
Flow Chart:
11
Start
Input three values:
a, b, c
If:
a>b & a>c
Max = aMax = c
If:
b>c
Max = bMax = c
End
True
True
False
False
-
7/29/2019 54604000 Visual Basic Projects
12/39
Design View:
Code View:
12
-
7/29/2019 54604000 Visual Basic Projects
13/39
Run View:
13
-
7/29/2019 54604000 Visual Basic Projects
14/39
Project 4 Develop an application program to convert Fahrenheit Temperature into Celsius
and vice versa.
Control and Properties:
Control Control Name Property Value
Command Button1 Command1 Caption Temperature in Fahrenheit
Command Button2 Command2 Caption Temperature in Celsius
Flow Chart:
Design View:
14
Start
Input Temp in Fahrenheit
c = 5 9 ( f 32 )
Print Temp in Celsius
End
Input Temp in Celsius
f = 9 5 c + 32
Print Temp in Fahrenheit
End
-
7/29/2019 54604000 Visual Basic Projects
15/39
Code View:
Run View:
15
-
7/29/2019 54604000 Visual Basic Projects
16/39
Project 5 Develop an application program to print a table in a list box of an inputted
number using the while --- wend structure.
Control and Properties:
Control Control Name Property Value
Label1 Label1 Caption Enter The Value
Text1 Text1 Text (Leave Blank)
Command Button1 Command1 Caption Table
List1 List1 List Table is:
Flow Chart:
16
Start
Input no. n
i < = 10i n
Print i n
Increment nEnd
True
False
-
7/29/2019 54604000 Visual Basic Projects
17/39
Design View:
Code View:
Run View:
17
-
7/29/2019 54604000 Visual Basic Projects
18/39
18
-
7/29/2019 54604000 Visual Basic Projects
19/39
Project 6 Develop an application program to enter a month and tell whether it has thirty
one, thirty, twenty nine or twenty eight days.
Control and Properties:
Control Control Name Property Value
Label1 Label1 Caption Enter month e.g. August
Text Box Text1 Text (Leave Blank)
Command Button Command1 Caption OK
Flow Chart:
19
Start
Input month
Case 1
Case 2
Case 3
Invalid month
End
Print month of 31 days
Print month of 28 or 29 days
Print month of 30 days
True
True
True
Else
-
7/29/2019 54604000 Visual Basic Projects
20/39
Design View:
Code View:
Run View:
20
-
7/29/2019 54604000 Visual Basic Projects
21/39
Run View:
21
-
7/29/2019 54604000 Visual Basic Projects
22/39
Project 7 Develop an application program to display back counting from 100 to 1.
Control and Properties:
Control Control Name Property Value
List Box List1 List (Leave Blank)
Column 10
Command Button Command1 Caption Back Counting from 100
Design View:
Code View:
22
-
7/29/2019 54604000 Visual Basic Projects
23/39
Run View:
23
-
7/29/2019 54604000 Visual Basic Projects
24/39
Project 8 Develop an application program that gets three digits number from the user
and display it in reverse order.
Control and Properties:
Control Control Name Property Value
Text Box Text1 Text (Leave Blank)
Command Button Command1 Caption Show
Label Label1 Caption Enter three digit No.
Design View:
Code View:
24
-
7/29/2019 54604000 Visual Basic Projects
25/39
Run View:
25
-
7/29/2019 54604000 Visual Basic Projects
26/39
Project 9 Develop an application program to gets the side of triangle in text box and
display the type of triangle.
Control and Properties:
Control Control Name Property Value
Text Box Text1 Text (Leave Blank)
Text Box Text2 Text (Leave Blank)
Text Box Text3 Text (Leave Blank)
Command Button Command1 Caption Check the Triangle
Label Label1 Caption Length of Side 1
Label Label2 Caption Length of Side 2
Label Label3 Caption Length of Side 3
Design View:
26
-
7/29/2019 54604000 Visual Basic Projects
27/39
Code View:
Run View:
27
-
7/29/2019 54604000 Visual Basic Projects
28/39
Run View:
28
-
7/29/2019 54604000 Visual Basic Projects
29/39
Project 10 Develop an application program to get an integer from user and display whether
it is prime number or not.
Control and Properties:
Control Control Name Property Value
Text Box Text1 Text (Leave Blank)
Command Button Command1 Caption Check
Label Label1 Caption Enter No.
Design View:
Code View:
29
-
7/29/2019 54604000 Visual Basic Projects
30/39
Run View:
30
-
7/29/2019 54604000 Visual Basic Projects
31/39
Project 11 Develop an application program to display sum of following series:
100
1
8
1
6
1
4
1
2
11 ++++++
Control and Properties:
Control Control Name Property Value
Command Button Command1 Caption Sum of Series
Design View:
Code View:
Run View:
31
-
7/29/2019 54604000 Visual Basic Projects
32/39
Project 12 Develop an application program to exchange the values of two text boxes using
procedure.
Control and Properties:
Control Control Name Property Value
Text Box Text1 Text (Leave Blank)
Text Box Text2 Text (Leave Blank)
Command Button Command1 Caption Exchange
Label Label1 Caption Enter 1st Value
Label Label2 Caption Enter 2nd Value
Design View:
Code View:
32
-
7/29/2019 54604000 Visual Basic Projects
33/39
Run View:
33
-
7/29/2019 54604000 Visual Basic Projects
34/39
Project 13 Develop an application program to display time by using timer control.
Control and Properties:
Control Control Name Property Value
Timer Timer1 Interval 1
Timer Timer2 Interval 2
Label Label1 Caption Current Time
Font Bold, 14
Label Label2 Caption Made By: Aneesa
Font Bold, 14
Design View:
Code View:
34
-
7/29/2019 54604000 Visual Basic Projects
35/39
Run View:
35
-
7/29/2019 54604000 Visual Basic Projects
36/39
Project 14 Develop an application program to print the factorial in a massage box using
the function Fact.
Control and Properties:
Control Control Name Property Value
Label Label1 Caption Enter number
Text Box Text1 Text (Leave Blank)
Command Button Command1 Caption Factorial
Flow Chart:
36
Start
Input no. N
F = 1
N > 1 F = F N
Increment
Print F
End
TrueFalse
-
7/29/2019 54604000 Visual Basic Projects
37/39
Design View:
Code View:
Run View:
37
-
7/29/2019 54604000 Visual Basic Projects
38/39
Project 15 Develop an application program to calculate sum of first ten even numbers using
the Do Loop While.
Control and Properties:
Control Control Name Property Value
Command Button Command1 Caption Sum of 1st Ten Even No.s
Flow Chart:
38
Start
n = 2
n
-
7/29/2019 54604000 Visual Basic Projects
39/39
Design View:
Code View:
Run View: