Results 1 to 4 of 4

Thread: Hi there can someone Tell me how can i capture keyboard KeyPress...

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Location
    Israel
    Posts
    14

    Question Hi there can someone Tell me how can i capture keyboard KeyPress...

    my problem is that i looking for A function who can tell me which
    key was presses on which form.
    I not looking for text1_KeyPress metod I'm lookink for a general keyPress.
    for EX: when the User Press RightArrow Key then Data On Specipic Form will Move Next
    thank

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    In that case, use the Form_KeyDown event (Make the sure KeyPreview property of your Form is set to True).
    VB Code:
    1. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    2.      If KeyCode = vbKeyRight Then
    3.         MsgBox "Right Arrow key was pressed."
    4.      End If
    5. End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Location
    Israel
    Posts
    14

    thank u I what I was looking for

    thank u

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    No problem. Glad to help...

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