Translating Geek to VB
This assignment tests your ability to translate event handlers from Geek to VB.
The following questions refer to a simple greeting program. As you see below, I have given each object on the form a name.
Translate the following event handlers from Geek to VB:
- English: Display the greeting.
Geek: Assign the value "Hello, my friend." to the Text property of txtOut.
VB:
- English: Erase the greeting.
Geek: Assign the value "" to the Text property of txtOut.
VB:
- English: Erase the greeting.
Geek: Execute the Clear method of txtOut.
VB:
-
Every event handler begins with a Private Sub statement and ends with an End Sub statement. What would be the Private Sub statement for the event that the user clicks on btnClear?