OnBeforeKeyPress
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
If you are talking about a control, Sure. Private Sub Button1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Button1.KeyDown End Sub or you could just trap the keypress for the entire form with: Set KEYPREVIEW on the FORM to TRUE and then you can do: Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown End Sub Or Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress End Sub I hope this helps. If not, just let me know.