title: C# While loop until button click
body: <p>I am making a program in Winforms (C#) in MS visual studio 2012</p>
  
  <p>I need the code to do this</p>
  
  <pre><code>code code code
  Event for button click from user
  //Start while loop..
  Do 
  {
  code code code
  code code code
  } (!button not click again)
  </code></pre>
  
  <p>I know that many talk about multithreading but I think that I am too low level to work with that for now, so if I can avoid it I will.</p>
  
  <p>EDIT: I ended up using multithreading, thanks for all the answers it really helped me a lot, but at the time multithreading was hard to understand.</p>