How to execute a long running operation?
<p>Is there any resources I can go to for tips on how to make a winForm with a long running operation?</p>

<p>My scenario is this.  I have a WinForm that calls an API and stores data into a datagridview with multiple columns and about 10,000+ Rows. </p>

<p>I'm running multiple operations, such as counting distinct instances of a value in different columns and running a math operator to get a value. That application runs on about 2000 rows, but when I get to 4000, I get COM errors or other things stop it from executing.</p>

<p>I don't care if I have access to the UI, I just need the application to run.</p>