Back to Examples
Public Class frmTraffic
  Private Sub txtGreen_Enter(sender As Object, e As EventArgs) Handles txtGreen.Enter
    txtGreen.BackColor = Color.Green
  End Sub

  Private Sub txtGreen_Leave(sender As Object, e As EventArgs) Handles txtGreen.Leave
    txtGreen.BackColor = Color.Gray
  End Sub

  Private Sub txtYellow_Leave(sender As Object, e As EventArgs) Handles txtYellow.Leave
    txtYellow.BackColor = Color.Gray
  End Sub

  Private Sub txtYellow_Enter(sender As Object, e As EventArgs) Handles txtYellow.Enter
    txtYellow.BackColor = Color.Yellow
  End Sub

  Private Sub txtRed_Enter(sender As Object, e As EventArgs) Handles txtRed.Enter
    txtRed.BackColor = Color.Red
  End Sub

  Private Sub txtRed_Leave(sender As Object, e As EventArgs) Handles txtRed.Leave
    txtRed.BackColor = Color.Gray
  End Sub
End Class
Back to Examples

Startup Discount
Small Business?
Contact us for an Enormous Discount!