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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started