You are on page 1of 39

Prepared By: Roll No.

: College:

Aneesa Shabbir Anjum ____________ F.G. Post Graduate College for Women, Wah Cantt.

Class: 3rd Year Supervised by: Miss Gul Naz

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

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

Table of Contents
Serial No.
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15.

Project Title
Program of a calculator having addition, multiplication, division and subtraction by using control array. Program to find out Leap Years from a century given by user. Program to input three integers and find out maximum integer Program to convert Fahrenheit Temperature into Celsius and vice versa Program to print a table in a list box of an inputted number using the while --- wend structure Program to enter a month and tell whether it has thirty one, thirty, twenty nine or twenty eight days Program to display back counting from 100 to 1 Program that gets three digits number from the user and display it in reverse order Program to gets the side of triangle in text box and display the type of triangle Program to get an integer from user and display whether it is prime number or not Program to display sum of series Program to exchange the values of two text boxes using procedure Program to display time by using timer control Program to print the factorial in a massage box using the function Fact Program to calculate sum of first ten even numbers using the Do Loop While

Page No.
5 9 11 14 16 18 21 23 25 28 30 31 33 35 37

Project 1
Develop a project to create a calculator having addition, multiplication, division and subtraction by using control array.

Control and Properties:


Control Label Control Name Result Property Caption Back Color Alignment Border Style Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption Value 0 White 1 Right Justify 1 Fixed Single 0 1 2 3 4 5 6 7 8 9 C Exit = . + * /

Command Button Command Button Command Button Command Button Command Button Command Button Command Button Command Button Command Button Command Button Command Button Command Button Command Button Command Button Command Button Command Button Command Button Command Button

Num(0) Num(1) Num(2) Num(3) Num(4) Num(5) Num(6) Num(7) Num(8) Num(9) C Exit Equal Point Op(+) Op(-) Op(*) Op(/)

Design View:

Code View:

Code View:

Code View:

Run View:

The run view shows the result of 450 25 = 18.

Project 2
Develop an application program to show leap years in given century.

Control and Properties:


Control Textbox Command Button List Box Label Control Name Result Command1 List1 Label1 Property Text Caption Caption Column Caption Value (Leave Blank) Leap Years List1 4 Enter a Century

Flow Chart:
Start

Input C Cent = c

False

C mod 4=0

True

List1 add item

Increment

C> cent + 100 End

Design View:

Program Code:

Run View:

10

Project 3
Develop an application program to input three integers and find out maximum integer.

Control and Properties:


Control Label Label Label Text Box Text Box Text Box Command Button Control Name Label1 Label2 Label3 Text1 Text2 Text3 Command1 Property Caption Caption Caption Text Text Text Caption Value Enter First Value Enter Second Value Enter Third Value (Leave Blank) (Leave Blank) (Leave Blank) Maximum Number

Flow Chart:
Start

Input three values: a, b, c

Max = c

False If: a>b & a>c

True

Max = a

Max = c

False If: b>c

True

Max = b

End

11

Design View:

Code View:

12

Run View:

13

Project 4
Develop an application program to convert Fahrenheit Temperature into Celsius and vice versa.

Control and Properties:


Control Command Button1 Command Button2 Control Name Command1 Command2 Property Caption Caption Value Temperature in Fahrenheit Temperature in Celsius

Flow Chart:
Start

Input Temp in Fahrenheit

Input Temp in Celsius

c = 5 9 ( f 32 )

f = 9 5 c + 32

Print Temp in Celsius

Print Temp in Fahrenheit

End

End

Design View:

14

Code View:

Run View:

15

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 Label1 Text1 Command Button1 List1 Control Name Label1 Text1 Command1 List1 Property Caption Text Caption List Value Enter The Value (Leave Blank) Table Table is:

Flow Chart:
Start

Input no. n

i < = 10

True

in

False

Print i n

End

Increment n

16

Design View:

Code View:

Run View:

17

18

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 Label1 Text Box Command Button Control Name Label1 Text1 Command1 Property Caption Text Caption Value Enter month e.g. August (Leave Blank) OK

Flow Chart:
Start

Input month

Case 1

True

Print month of 31 days

Case 2

True

Print month of 30 days

Case 3

True

Print month of 28 or 29 days

Else

Invalid month

End

19

Design View:

Code View:

Run View:

20

Run View:

21

Project 7
Develop an application program to display back counting from 100 to 1.

Control and Properties:


Control List Box Command Button Control Name List1 Command1 Property List Column Caption Value (Leave Blank) 10 Back Counting from 100

Design View:

Code View:

22

Run View:

23

Project 8
Develop an application program that gets three digits number from the user and display it in reverse order.

Control and Properties:


Control Text Box Command Button Label Control Name Text1 Command1 Label1 Property Text Caption Caption Value (Leave Blank) Show Enter three digit No.

Design View:

Code View:

24

Run View:

25

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 Text Box Text Box Text Box Command Button Label Label Label Control Name Text1 Text2 Text3 Command1 Label1 Label2 Label3 Property Text Text Text Caption Caption Caption Caption Value (Leave Blank) (Leave Blank) (Leave Blank) Check the Triangle Length of Side 1 Length of Side 2 Length of Side 3

Design View:

26

Code View:

Run View:

27

Run View:

28

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 Text Box Command Button Label Control Name Text1 Command1 Label1 Property Text Caption Caption Value (Leave Blank) Check Enter No.

Design View:

Code View:

29

Run View:

30

Project 11
Develop an application program to display sum of following series:
1+ 1 1 1 1 1 + + + + + 2 4 6 8 100

Control and Properties:


Control Command Button Control Name Command1 Property Caption Value Sum of Series

Design View:

Code View:

Run View:

31

Project 12
Develop an application program to exchange the values of two text boxes using procedure.

Control and Properties:


Control Text Box Text Box Command Button Label Label Control Name Text1 Text2 Command1 Label1 Label2 Property Text Text Caption Caption Caption Value (Leave Blank) (Leave Blank) Exchange Enter 1st Value Enter 2nd Value

Design View:

Code View:

32

Run View:

33

Project 13
Develop an application program to display time by using timer control.

Control and Properties:


Control Timer Timer Label Label Control Name Timer1 Timer2 Label1 Label2 Property Interval Interval Caption Font Caption Font Value 1 2 Current Time Bold, 14 Made By: Aneesa Bold, 14

Design View:

Code View:

34

Run View:

35

Project 14
Develop an application program to print the factorial in a massage box using the function Fact.

Control and Properties:


Control Label Text Box Command Button Control Name Label1 Text1 Command1 Property Caption Text Caption Value Enter number (Leave Blank) Factorial

Flow Chart:
Start

Input no. N

F=1

False

N>1

True

F=FN

Increment

Print F

End

36

Design View:

Code View:

Run View:

37

Project 15
Develop an application program to calculate sum of first ten even numbers using the Do Loop While.

Control and Properties:


Control Command Button Control Name Command1 Property Caption Value Sum of 1st Ten Even No.s

Flow Chart:
Start

n=2

n <= 20 Step 2

False

Print Sum of Even Numbers

True Sum = Sum + n

End

38

Design View:

Code View:

Run View:

39

You might also like