IDEAL INSTITUTE OF MANAGEMENT AND TECHNOLOGY
Practical file of Visual Basic
Submitted To: XXXXXXXXX XXXXXXXXXXXXXXXXXXX ( Asst. Prof. I.T XXXXXXXXXXX )
1
Submitted By: BBA En.Roll.No.-
CERTIFICATE
This is to certify that XXXXXXX pursuing BBA(CAM) from IIMT has completed this practical file under my supervision and guidance. She has taken care of all the instructions and shown interest and sincerity during the completion of this computer practical file is up to my expectation as per the quality laid down by Guru Gobind Singh Indraprastha University, Dwarka ,Delhi.
XXXXXXXXXXXXXXX ( Asst. Prof. I.T )
ACKNOWLEDGEMENT
An undertaking such as this is never the work of single person is no exception. I, at the very outset, thank and express my gratitude to all those who directly or indirectly helped me a lot in completion of the present practical work and encouraged, inspire and enthusiasts me in the moment of despair and made it possible for this report to be in your hand today. First of all, I wish to express my profound feeling of gratitude and indebt to my project guide XXXXXXXX (Asst. Prof. I.T). IIMT (Delhi) for her advice and guidance during various stages of this practical. In spite of her preoccupation and job responsibilities she has spared her time during the completion of this work. I thank her whole heartedly. I wish to record my sincere gratitude to XXXXXXXX (Asst. Prof. I.T), who provided constant support to me during my work.
XXXXXXXXXXX Enroll.NoXXXXXXXXXXX Course BBA.
Contents
S.No.
Particulars Visual basic- introduction Features of visual basic Advantages and disadvantages Practical assignment Registration form
Page No.
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17.
6 7 8 10 11
Program to calculate average of three numbers 14 Print factorial of a number given by user Call by value Call by reference Show the working of option button and check box Pop up menu creation Program to print Fibonacci series Print factorial of a number given by user Write a program to find ever or odd. Program to find prime number Select case Write a program to sum the digits of the
4
17 20 23 26 29 32 35 38 41 44 47
numbers 18. 19. 20. 21. While loop Implementation of traffic light. Swapping of two numbers Simple calculator 50 53 57 60
Visual basic- Introduction
Visual Basic is a visual version of a computer language named BASIC. BASIC is a high level programming language that supports text- only environment. BASIC is beginners All Purpose Symbolic Instruction Code. It is an instruction code that uses symbols and meant for all purpose scientific or business. Each instruction is executed i.e run sequentially. Since BASIC is a beginners language, it is easy to learn and write. Visual Basic moves a step forward, uses the syntaxes of BASIC and runs the events in a graphical environment. There are number of objects in graphical environment. Each of them can program independently to respond to the events. This language is also called Rapid Application Development (RAD) Tool because the programmer can develop a wide range of Windows, web, mobile and office applications on rapid pace. The language is accessible to everyone from a novice programmer to advanced system architect.
Features of visual basic
It is extensively used by the businesses. It is easy to learn It shows the interface what the user has code in code window It leads to rapid industrial development. It use drag and drop facility while designing a form. It contains an excellent help guide and booked online to write the correct codes for an application.
It contains Dialog Box facility which helps the user to display the information to the user and ask for necessary information too as these are two types of Dialog Box.
It is object-oriented. It is based on GUI (Graphical User Interface). It provides various options of projects to be designed like standard EXE, Active X EXE, etc.
It provides the facility of pop-up menu and sub menu to be used. It contains code window which is used to give source code for any no. of events.
7
Advantages of Visual Basic
The structure of the Basic programming language is very simple, particularly as to the executable code.
VB is not only a language but primarily an integrated, interactive development environment ("IDE").
The VB-IDE has been highly optimized to support rapid application development ("RAD"). It is particularly easy to develop graphical user interfaces and to connect them to handler functions provided by the application.
The graphical user interface of the VB-IDE provides intuitively appealing views for the management of the program structure in the large and the various types of entities (classes, modules, procedures, forms, ...). VB provides a comprehensive interactive and context-sensitive online help system.
When editing program texts the "IntelliSense" technology informs you in a little popup window about the types of constructs that may be entered at the current cursor location.
VB is a component integration language which is attuned to Microsoft's Component Object Model ("COM").
COM components can be written in different languages and then integrated using VB.
Interfaces of COM components can be easily called remotely via Distributed COM ("DCOM"), which makes it easy to construct distributed applications.
COM components can be embedded in / linked to your application's user interface and also in/to stored documents (Object Linking and Embedding "OLE", "Compound Documents").
There is a wealth of readily available COM components for many different purposes.
Practical assignment
1.Registration form
Design Window
10
Code Window
11
Run Window
12
2.Program to calculate average of three numbers
Design Window
13
Code Window
14
Run Window
15
3.Print factorial of a number given by user
Design Window
16
Code Window
17
Run Window
18
4.Call by value
Design Window
19
Code Window
20
Run Window
21
5.Call by reference Design Window
22
23
Code Window
Run Window
24
6.Show the working of option button and check box
Design Window
25
Code Window
26
Run Window
27
7.Pop up menu creation
Design Window
28
Code Window
29
Run Window
30
8.Program to print Fibonacci series Design Window
31
Code Window
32
Run Window
33
9.Print factorial of a number given by user Design Window
34
Code Window
35
Run Window
36
10.Write a program to find ever or odd.
Design Window
37
Code Window
38
Run Window
39
11.Program to find prime number Design Window
40
Code Window
41
Run Window
42
12.Select case
Design Window
43
Code Window
44
Run Window
45
13.Write a program to sum the digits of the numbers
Design Window
46
Code Window
47
Run Window
48
14.While loop Design Window
49
Code Window
50
Run Window
51
15.Implementation of traffic light. Design Window
52
Code Window
53
Run Window
54
Run Window
Run Window
55
16.Swapping of two numbers Design Window
56
Code Window
57
Run Window
58
17.Simple calculator
Design Window
59
Code Window
60
61
Run Window
62