T
Tomas Andersson
I created a form that has KeyPreview enabled
On this form threre is four groupboxes
and some buttons in one of the GBoxes
the keyevent works fine on all keys exept Return.
And if i remove the buttons from the form the return event works.
How do I keep the buttons and get the form to respond to Return?
Private Sub form1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode <= 32 Then
Call RemoveButtons()
e.Handled = True
Else
a = a + Chr(e.KeyValue.ToString)
e.Handled = True
End If
End sub
On this form threre is four groupboxes
and some buttons in one of the GBoxes
the keyevent works fine on all keys exept Return.
And if i remove the buttons from the form the return event works.
How do I keep the buttons and get the form to respond to Return?
Private Sub form1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode <= 32 Then
Call RemoveButtons()
e.Handled = True
Else
a = a + Chr(e.KeyValue.ToString)
e.Handled = True
End If
End sub