BackgroundWorker
The BackgroundWorker component executes an operation on a separate, dedicated thread. Operations like downloads and database transactions that take time can cause your user interface to appear unresponsive. The BackgroundWorker component will execute a time-consuming operation in the background, listen for events that report the progress of your operation and signal when your operation is finished - without an unresponsive user interface.
Properties
The key properties for the BackgroundWorker component include:
-
WorkerReportsProgress. Determines whether the BackgroundWorker can report progress updates.
- WorkerSupportsCancellation. Determins whether the BackgroundWorker supports cancellation during the process.
Events
The key events for the BackgroundWorker component include:
-
DoWork. This event is raised when you call the method to start the operation that performs the potentially time-consuming work.
Adding a BackgroundWorker
When you drag an BackgroundWorker component from the Toolbox to a form in the Flow Designer, it will appear as an entry in the design space. You can select the control and configure it using the Properties pane.
Select the Events icon to open the Events pane and configure the DoWork event.
For information on configuring events and other components of the design using a script, see: Working with Scripts.
More information on the BackgroundWorker component can be viewed at the link to Microsoft® Documentation.
For more information on working with a DataSet, including how to display the data with a DataGrid control, see Working with Data.