I have a Winform app which lists a batch of invoices in a gridview. The users select the batch and clicks a button, “Generate Invoices”. The process takes about 4-5 mins. While this is running I will have a marquee progress bar and would like to disable all buttons.
Should I use a BackgroundWorker Process or create a new thread to run this task?
This is the exact type of task for which BackgroundWorker is meant. You should just push this into a background worker, and allow it to run. This provides a simple way to update your progress bar, etc.
There is no reason to make your own thread for this. The ThreadPool via BackgroundWorker will work perfectly well.