You need to update a user interface element on a window from another thread.
Place your update logic in a separate subroutine, and use the Control.Invoke method to marshal this code to the user interface thread.
Windows controls are not thread-safe. That means that it isn’t safe to update a user interface control from any thread other than the thread that created it. In fact, you might test code that ignores this restriction without experiencing any trouble, only to have the same code cause maddeningly elusive problems in a production environment.
This problem isn’t restricted to code that executes in a custom-threaded object. It also applies to code that responds to a callback ...