in the form props turn keypreview on
in the code use the keydown (sometimes key up or keypres could be better)
example
\\
Private Sub frm_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
Try
If e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Return Then
'txt()
Select Case True
Case txtZoek.Focused
vulData()
Case Else
SendKeys.Send("{Tab}")
End Select
End If
If e.KeyCode = Keys.Down Then
GridDown()
End If
If e.KeyCode = Keys.Up Then
GridUp()
End If
Catch ex As Exception
fmMain.boodschap("formkeydown: " & ex.Message, 6)
End Try
End Sub
//
"YSChong" <yi****@hotmail.com> wrote in message
news:be**************************@posting.google.c om...
Hi all,
I'm just a newbie doing undergrad in Computing. I always face problems
when it comes to looking for an appropriate method. Lately, I've been
trying to write an application that listens to every single keystroke
from the keyboard. I don't seem to be able to find the proper way to
do that. Thanks in advance!!