title: C# Keydown/Keyevents if no key is pressed
body: <p>I am programming something right now in c#, trying to "convert" a console application to a windows Forms application and I wanted to do something like the following:</p>
  
  <pre><code>if("keypress == nokey") 
  {
      system.threading.thread.sleep ***
  }
  while(nokeyispressed) 
  {
      system.threading...
  }
  </code></pre>
  
  <p>Basically ask if no key is pressed sleep for some time and this.close();</p>
  
  <p>so that if no key is pressed, do something...
  I just can't get it to work.
  I would be very greatful for some help..:D</p>