How to use a BackgroundWorker :: Vb.NET



How to use a BackgroundWorker :: Vb.NET

How to use a BackgroundWorker :: Vb.NET

In this tutorial we will learn how to use a background worker to make things work in the background of the applications!

For example, if we have a loop that might takes 10 seconds to complete. While the GUI is busy processing that loop, the GUI of the application will be hang/frozen and the end user can not interact with it during these loop processing time. Which makes it a serious bug.

On the other hand, a thread can be used to keep the GUI application responsive. The thread or as known as BackgroundWorker will hold and execute the loop at the background that takes long time to complete. During that processing time, the thread is free to update the GUI form from the thread reporting task.

Comments are closed.