PDA

Click to See Complete Forum and Search --> : Hi there can someone Tell me how can i capture keyboard KeyPress...


meravsha
Nov 29th, 2001, 05:23 AM
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

Hack
Nov 29th, 2001, 07:25 AM
In that case, use the Form_KeyDown event (Make the sure KeyPreview property of your Form is set to True).Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyRight Then
MsgBox "Right Arrow key was pressed."
End If
End Sub

meravsha
Nov 29th, 2001, 07:57 AM
thank u

Hack
Nov 30th, 2001, 01:33 PM
No problem. Glad to help...:D