R
RS
I would like to interface with the Win32 API and I need the HWND handle
to Form1 ( I'm assuming it is Me.Handle) and I need Form1 to respond to
keyboard input. Using the information from a previous question I have
entered the following into my IDE and cannot get any response:
Friend WithEvents Form1 As System.Windows.Forms.Form
Private Sub Form1_KeyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles _
Form1.KeyDown
Dim i As Integer = 0
Select Case e.KeyCode
Case Keys.Left
i += 1
'etc..................
End Select
End Sub
How can I get my code to respond to keyboard events ?
TIA RS
to Form1 ( I'm assuming it is Me.Handle) and I need Form1 to respond to
keyboard input. Using the information from a previous question I have
entered the following into my IDE and cannot get any response:
Friend WithEvents Form1 As System.Windows.Forms.Form
Private Sub Form1_KeyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles _
Form1.KeyDown
Dim i As Integer = 0
Select Case e.KeyCode
Case Keys.Left
i += 1
'etc..................
End Select
End Sub
How can I get my code to respond to keyboard events ?
TIA RS