I have the following code which is working fine
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Select Case e.KeyCode
Case 40
Timer1.Enabled = True
Case 38
Timer2.Enabled = True
Case 37
Timer3.Enabled = True
Case 39
Timer4.Enabled = True
End Select
End Sub
and for example timer1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim h As Integer
h = (PictureBox1.Location.Y)
h += 1
PictureBox1.Location = New Point(PictureBox1.Location.X, h)
End Sub
But the moment i put a button on my form, the keydown module doesn't react anymore
Anybody an idea why ?
Thx
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Select Case e.KeyCode
Case 40
Timer1.Enabled = True
Case 38
Timer2.Enabled = True
Case 37
Timer3.Enabled = True
Case 39
Timer4.Enabled = True
End Select
End Sub
and for example timer1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim h As Integer
h = (PictureBox1.Location.Y)
h += 1
PictureBox1.Location = New Point(PictureBox1.Location.X, h)
End Sub
But the moment i put a button on my form, the keydown module doesn't react anymore
Anybody an idea why ?
Thx