title: Handling a timer from a class
body: <p>I want some values in a class to decrease whenever the timer in the main form ticks. I am creating multiple instances of the same class as my program is a simulation application and I am not storing these instances in an array or any list in that matter. I simply declare them and add their picture box to the controls on the main form. However I am hoping to have a sub routine inside the class that triggers whenever the timer in the main form ticks. I thought of something like this: </p>
  
  <pre><code>Public Class Jimmy
      Dim _a As Integer = 10
  
      Sub decreseNum(sender As Object, e As EventArgs) Handles mainapp.tmrLog.Tick
          _a -= 1
      End Sub
  
  End Class
  </code></pre>
  
  <p>with <code>mainapp</code> being the name of the main form and <code>tmrLog</code> being the timer I want to associate my sub routine with. However the above code doesn't work</p>