Hi there,
I am new to Visual Basic and to the Forums. I have been working on an assignment for my class, and there is one problem I have been encountering. I am trying to figure out how to set a yellow background color when the focus is on a Textbox, and have it set back to white, when the focus is no longer on it. So far, here is the coding I have tried, but nothing has really worked.
Here is the code:
Private Sub txtAdultPricePerTicket_GotFocus()
txtAdultPricePerTicket.BackColor = Color.Yellow
End Sub
Private Sub txtAdultPricePerTicket_LostFocus()
txtAdultTicketsSold.BackColor = Color.White
End Sub
Can someone tell me what I am doing wrong?
I am new to Visual Basic and to the Forums. I have been working on an assignment for my class, and there is one problem I have been encountering. I am trying to figure out how to set a yellow background color when the focus is on a Textbox, and have it set back to white, when the focus is no longer on it. So far, here is the coding I have tried, but nothing has really worked.
Here is the code:
Private Sub txtAdultPricePerTicket_GotFocus()
txtAdultPricePerTicket.BackColor = Color.Yellow
End Sub
Private Sub txtAdultPricePerTicket_LostFocus()
txtAdultTicketsSold.BackColor = Color.White
End Sub
Can someone tell me what I am doing wrong?