Uploaded by martin maponda

Events Exercises

advertisement
Visual Basic Programming [Lesson 1 To Lesson 8]
Events: Exercises
Author: Kasun Ranga Wijeweera
Email: krw19870829@gmail.com
Date: 2020 April 16
1)
a)
b)
c)
d)
Start a new Visual Basic Windows Forms Application project.
Add two buttons to the form.
Add a subroutine that displays the text “Hello” in a message box.
Modify the subroutine such that it gets executed when clicking any of the two buttons.
2)
a) Start a new Visual Basic Windows Forms Application project.
b) Add a button to the form.
c) The text “LEFT” should be displayed in a message box when the button was pressed
using the left mouse button.
d) The text “RIGHT” should be displayed in a message box when the button was pressed
using the right mouse button.
3)
a) Start a new Visual Basic Windows Forms Application project.
b) The coordinates of the mouse pointer with respect to the form should be displayed in a
message box when left mouse button is pressed.
4)
a) Start a new Visual Basic Windows Forms Application project.
b) Add a text box to the form.
c) The content of the text box should be cleared when the space bar is pressed.
5)
a) Start a new Visual Basic Windows Forms Application project.
b) Add two text boxes to the form.
c) The text in the first text box should be converted into uppercase when the text box is left
by the user.
6)
a)
b)
c)
d)
Start a new Visual Basic Windows Forms Application project.
Add a text box and a button to the form.
The text box should be disabled at the initial run of the form.
The user should be able to enable the text box using the button.
1 of 1
Download