title: Any Button Stops Timer in vb.net
body: <p>I have two timers that run in Visual Studio and one works perfectly fine, but the other stops whenever i hit any key while it's running, if i don't hit any key, it works fine.  Sorry if the codes messy im new at this XD.</p>
  
  <pre><code>Private Sub Form1_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown
      If PictureBox2.Top = 277 Then
          Label3.Text = "Label3"
      End If
      If e.KeyCode = Keys.W And Label3.Text = "Label3" Or Label3.Text = "single" And e.KeyCode = Keys.W Then
          PictureBox2.Top = PictureBox2.Top - 64
      End If
      If PictureBox2.Top = 213 Then
          Label3.Text = "single"
      End If
      If e.KeyCode = Keys.W Then
          Label1.Text = "0"
      End If
      If Label1.Text = "0" And Label3.Text = "single" Then
          Label2.Text = "0"
      End If
      If e.KeyCode = Keys.W Then
          Timer1.Enabled = True
      End If
      If PictureBox2.Top = 149 Then
          Label3.Text = "double"
      End If
      If Label3.Text = "double" Then
          Timer2.Enabled = True And Label2.Text = "0"
      End If
  End Sub
  Friend WithEvents Timer1 As System.Windows.Forms.Timer
  
  Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
      Label1.Text = Label1.Text + 1
      If Label1.Text = "30" Then
          Timer1.Enabled = False
      End If
      If Timer1.Enabled = False And Label3.Text = "single" Then
          PictureBox2.Top = PictureBox2.Top + 64
      End If
  End Sub
  Friend WithEvents Label1 As System.Windows.Forms.Label
  
  Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  
  End Sub
  Friend WithEvents Label2 As System.Windows.Forms.Label
  Friend WithEvents Timer2 As System.Windows.Forms.Timer
  
  Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
      Label2.Text = Label2.Text + 1
      If Label3.Text = "double" Then
          Timer2.Enabled = True
      End If
      If Label2.Text = "30" Then
          Timer2.Enabled = False
      End If
      If Timer2.Enabled = False And Label3.Text = "double" Then
          PictureBox2.Top = PictureBox2.Top + 128
      End If
  End Sub
  </code></pre>