Question: 6 . Assume that the three objects on the form were created in the order txtFirst, txtSecond, and lblOne. Determine the output displayed in lblOne
6. Assume that the three objects on the form were created in the order txtFirst, txtSecond, and lblOne. Determine the output displayed in lblOne when the program is run and the Tab key is pressed. Note: Initially, txtFirst has the focus. (2 marks)
a. Private Sub txtFirst_Leave() Handles txt|First.Leave
lblOne.Forecolor = Color.Green
lblOne.Text = Hello
End Sub
b. Determine the errors. (1 mark)
Private Sub btnOutput_Click ( ) Handles btnOutput.Click
txtBox .Forecolor = Red
End Sub
c. Write a line of code to carry out the task. (3 marks)
i. Display E.T. phone home. in lblTwo.
ii. Display Life is like a box of chocolates. in red letters in txtBox.
d. Write a program to carry out the stated task. (4 marks)
When one of the three buttons is pressed, the words on the button are displayed in the text box with the stated alignment.
6. Assume that the three objects on the form were created in the order txtFirst, txtSecond, and IblOne. Determine the output displayed in lblOne when the program is run and the Tab key is pressed. Note: Initially, txtFirst has the focus. ( 2 marks) a. Private Sub txtFirst_Leave(...) Handles txt|First.Leave lblOne.Text = "Hello" End Sub b. Determine the errors. ( 1 mark) Private Sub btnOutput_Click (...) Handles btnOutput.Click txtBox .Forecolor = Red End Sub c. Write a line of code to carry out the task. (3 marks) i. Display "E.T. phone home. " in lblTwo. ii. Display "Life is like a box of chocolates. " in red letters in txtBox. d. Write a program to carry out the stated task. (4 marks) When one of the three buttons is pressed, the words on the button are displayed in the text box with the stated alignment
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
