Click here to Skip to main content
15,880,427 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
VB
Private Sub one_Click(ByVal sender As Object, ByVal e As EventArgs) Handles one.Click
       empBox.Text += 1
       If empBox.Text = 1 Then
           one.BackColor = Color.Red
       End If

   End Sub
Posted
Updated 27-Mar-15 4:10am
v2

1 solution

I don't exactly know how it is like in Basic, but at least in C# the textboxes provide an 'Enter' and a 'Leave' event. Consider setting the BackColor in the Enter-event to Red, and setting it in the Leave-event back to its original color.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900