title: KeyEventArgs to Timer.Tick
body: <p>I try to get KeyEventArgs to Tick. If someone thinks why I'm using timer, so it needs to detect keypress outside of window too.</p>
  
  <p>I don't have "error" in this code, but when I run program comes:</p>
  
  <p><code>Exception Unhandled. System.NullReferenceExpetion: (i try to translate) 'Your object referral can't define object occurrence'</code> </p>
  
  <p>Now thing what I'm using is</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>private void Form1_Load(object sender, EventArgs e)
          {
              A.Start();
              A.Interval = 1;
          }
  
  private void A_Tick(object sender, EventArgs e)
          {
              KeyEventArgs ke = e as KeyEventArgs;
              if (ke.KeyCode == Keys.R) 
              {
              test = true;     
              }       
          }
              </code></pre>
  </div>
  </div>
  </p>
  
  <p>I really need help, because this error has been so long time. Thanks</p>