Visual Basic
Visual Basic
2023
VISUAL PROGRAMMING
Instructions
ANSWER ALL QUESTIONS IN SECTION
CHEATING OF ANY FORM WILL LEAD TO
CANCELLATION OF THE WHOLE PAPER
1. What is Visual Basic (4 mks)
5. List three project elements found in the Project Explorer in Visual basic IDE (2mks)
6. Discuss any FOUR data types used in Visual Basic program (8mks)
7. a) outline the function of each of the following tool box features in a visual basic
program: (10mks)
i) Pointer
ii) Frame
iii) Ole
iv) Drive list box
v) Shape
8. Explain the function of each of the following IDE interface of a Visual Basic
program:
i) Form Window
9. Write a Visual Basic program to Grade students performance using the tabulated
grading system
(5mks)
Marks Grade
85-99 Distinction
65-84 Credit
40-64 Pass
0-39 Fail
10. Distinguish between the Do While…..Loop and Do…Loop While statements as used
in Visual Basic program. Give a syntax in each case. (6 mks)
11. The vertical height(h) in metres of a particle projected vertically upwards with
initial velocity 10m/s with respect to time(t) is obtained using formula h=100t+4.9t2
Write a Visual Basic program that prompts the user to enter time (t) using input
box and display it in textbox named TXTTIME. The program should then use a
function to compute and the height in metres then display the results in a label
named LBLHEIGHT. Attach the code to a command button named
CMDCOMPUTE. (8mks)
12. Write a Visual Basic program to display all the ODD NUMBERS between 1 to 100.
Use Do…Loop in a listbox named LSTODD (6mks)
14. Discuss an THREE components found in the Visual Basic startup Dialobox (6 mks)