title: method waiting for an winform event
body: <p>in a programm i've been developing, a method is needed to wait until ENTER is clicked inside a specific textbox (generally, winform event called). i know i shold be doing this with threads, but dont know how to make a method that will do that. more specificly, i don't know how to call the event method on the thread, and cannot call in on Main, because it's blocked until this method is called.</p>
  
  <p>the method stopping the Main thread is:</p>
  
  <pre><code> void WaitForInput()
   {
       while (!gotInput)
       {
           System.Threading.Thread.Sleep(1);
       }
   }
  </code></pre>
  
  <p>thanks for helpers.</p>