You can update your progress bar with threading.
.NET Includes a class called the
BackgroundWorker, which provides methods for reporting the progress of the background thread in an event. The event is automatically called on the thread which created the BackgroundWorker (typically, the UI thread).
Subscribe to that "ProgressChanged" event, and update the progress bar in that event handler. The official MSDN Documentation provides some sample code.
Source:
Updating a progress bar in a C# Gui from another thread and class[
^]