i am Using Two Type of event-handling Enter and Leave in one Function, using with If-Statement.
Any buddy please correct my script.
Private Sub MaskedTextBox_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OrgNameTextBox.Enter, OrgNameTextBox.Leave
If Event = Enter Then
CType(sender, Control).BackColor = Color.Yellow
CType(sender, Control).ForeColor = Color.Black
ElseIf Event = Leave Then
CType(sender, Control).BackColor = Color.Black
CType(sender, Control).ForeColor = Color.White
End If
End Sub
Aucun commentaire:
Enregistrer un commentaire