PROGRAMMING II
PROGRAMMING II
QUESTION 1
QUESTION 2
ii. List two common controls found in the Visual Basic Toolbox (4 Marks)
iii. What is the purpose of the 'Button' control in Visual Basic? (4 Marks)
iv. Describe the use of the 'TextBox' control in Visual Basic (4 Marks)
QUESTION 3
Create a simple form in Visual Basic that includes a TextBox, a Button, and a Label. Describe the
steps you took to add these controls to the form and how you configured their properties
Provide a step-by-step explanation of how you added a TextBox, a Button, and a Label to a form in
Visual Basic. Include details on how you configured their properties. (10 Marks)
Write a Visual Basic code snippet that changes the text of a Label control when a Button is
clicked.
Provide a code example that demonstrates how to change the text of a Label control when a Button is
clicked in Visual Basic. (10 Marks)
QUESTION 4
Write a Visual Basic code snippet that calculates the sum of two numbers entered by the user in
TextBox controls and displays the result in a Label control
Provide a code example that demonstrates how to calculate the sum of two numbers entered by the user
in TextBox controls and display the result in a Label control. (10 Marks)
Develop a Temperature Converter Application Task: Create an application in Visual Basic that
converts temperatures between Celsius and Fahrenheit.
Instructions:
o Add TextBox controls for entering the temperature value.
o Add RadioButton controls to select the conversion direction (Celsius to Fahrenheit or
Fahrenheit to Celsius).
o Add a Button to perform the conversion.
o Add a Label to display the converted temperature.
Write the code to perform the conversion based on the selected direction (10 Marks)
QUESTION 5