B
Bob Achgill
No this is not a new dance.
OK. Am I missing something. The following code captures
the cursor keys alright on the form1 for
everywhere except when the focus is on a DataGrid or
AxWebBrowser.
Yes i have set the KeyPreview property on the form to
true. Almost home!
I saw another post that said that DataGrid was
not behaving with allowing key capture. Maybe this is a
similar problem. Except that I want to capture keys
anywhere on the form.
Is KeyPreview at the form level not all powerful?
' +++++++++++++++++++++++++++++++++++++++++++++++
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e
As System.Windows.Forms.KeyEventArgs) Handles
MyBase.KeyDown
If e.KeyCode = 37 Then ' Cursor left
' [etc.]
If e.KeyCode = 39 Then ' Cursor right
' [etc.]
End Sub
' ++++++++++++++++++++++++++++++++++++++++++++++++
OK. Am I missing something. The following code captures
the cursor keys alright on the form1 for
everywhere except when the focus is on a DataGrid or
AxWebBrowser.
Yes i have set the KeyPreview property on the form to
true. Almost home!
I saw another post that said that DataGrid was
not behaving with allowing key capture. Maybe this is a
similar problem. Except that I want to capture keys
anywhere on the form.
Is KeyPreview at the form level not all powerful?
' +++++++++++++++++++++++++++++++++++++++++++++++
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e
As System.Windows.Forms.KeyEventArgs) Handles
MyBase.KeyDown
If e.KeyCode = 37 Then ' Cursor left
' [etc.]
If e.KeyCode = 39 Then ' Cursor right
' [etc.]
End Sub
' ++++++++++++++++++++++++++++++++++++++++++++++++