[RESOLVED] Textbox change detect
I want to detect when the user has changed the content of a Textbox.
The following does not work for me, because: When the user navigates through the database (using my navigation buttons), the textbox is also changed, but NOT by the user making input. I would only like to know when the user EDITED the Textbox.
Code:
Private Sub mskStudentNumber_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles mskStudentNumber.TextChanged
If Not Movement Then '' If not navigation
mskStudentNumber.BackColor = Color.CadetBlue
ChangesMade = True
End If
End Sub
The MOVEMENT is when i tried to detect when the user navigated using my navigation controls.
Re: Textbox change detect
Just use the keydown/keypress event.
MSDN KeyDown
MSDN KeyPress