Developers used to code multi thread applications know that UI controls cannot be accessed by a different thread other than the one that has created the controls.
To perform this task you will have to use the ISynchronizeInvoke interface under the System.ComponentModel namespace that allows your application to execute synchronously or asynchronously a delegate on the same thread that has created the controls.
1. BeginInvoke: Used to execute a delegate asynchronously;
2. Invoke: The Invoke method expects the same parameters than BeginInvoke but will be executed synchronously.
1. InvokeRequired: The boolean property checks if the current thread is different than the one that has created the control.
A quick example about how to use based on event and delegate.
public delegate void MyDelegate();
public event MyDelegate OnMyEvent;
/// Add the event handler on the form initialization
this.OnMyEvent += new MyDelegate(MyMethod);
ISynchronizeInvoke iSync = (ISynchronizeInvoke)this;
/// Check if the event was generated from another
/// thread and needs invoke instead
MyDelegate myDelegate = new MyDelegate(OnMyEvent);
// If the request is not coming from a separate thread
// call the method that accesses the UI controls