| Start |
|---|
| Accessing GUI components in BackgroundWorker You cannot access any GUI components from the BackgroudWorker. For example if you try to do something like this you will receive a runtime error saying that "Cross-thread operation not valid: Control 'TextBox1' accessed from a thread other than the thread it was created on." This is because the BackgroundWorker runs your code on another thread in parallel with the main thread, and the GUI components are not thread-safe. You have to set your code to be run on the main thread using the Or you can use the ReportProgress method of the BackgroundWorker: |
| Using BackgroundWorker Executing a task with the background worker. Double Click on the This is how the BackgroundWorker appears after adding it. Double click on the added control to get the Calling the BackgroundWorker to perform the task can be done at any event like Modify the This will display a message box saying |
Read Article
https://develop.horje.com/learn/1434/reference