Results 1 to 2 of 2

Thread: [RESOLVED] Textbox change detect

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2008
    Location
    South Africa
    Posts
    395

    Resolved [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.

  2. #2
    Frenzied Member mickey_pt's Avatar
    Join Date
    Sep 2006
    Location
    Corner of the Europe :)
    Posts
    1,959

    Re: Textbox change detect

    Just use the keydown/keypress event.

    MSDN KeyDown
    MSDN KeyPress

    Rate People That Helped You
    Mark Thread Resolved When Resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width