|
-
Feb 22nd, 2004, 11:50 AM
#1
Thread Starter
Junior Member
key down/key press/key up
the specific key it activates a timer only once so it does not activate the timer over and over and over again. the timer that i'm activating causes tmrMove1.enabled = True. Then the tmrMove1.Enabled activates timers up to move10 which goes back to tmr move1. here is a sample of my code.
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
picMove1.Left = picMove1.Left + x
picMove10.Hide()
picMove1.Show()
If picMove1.Left >= 1000 Then
picMove1.Left = 1
End If
Timer1.Enabled = False
Timer2.Enabled = True
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
picMove2.Left = picMove1.Left + x
picMove1.Left = picMove2.Left + x
picMove1.Hide()
picMove2.Show()
Timer2.Enabled = False
Timer3.Enabled = True
End Sub
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
Select Case e.KeyCode
Case Keys.D
Timer10.Enabled = True
End Select
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|