title: Continue mouse press and release simulation while holding mouse click C#
body: <p>So what I mean is for example while holding LEFT_CLICK, simulate mouse click and release.</p>
  
  <p>I tried this many ways but it tells my computer I unclicked and therefore, stops the loop.</p>
  
  <pre><code>if (Keys.KEYCLICKSTATE)
  {
      Keys.mouse_event(Keys.MouseLeftDown, 0, 0, 0, new UIntPtr());
      Keys.mouse_event(Keys.MouseLeftUp, 0, 0, 0, new UIntPtr());
      Thread.Sleep(25);
  }
  </code></pre>