Cross-Thread UI updating is bad and will throw exceptions if you violate a cross-thread action. To workaround this, you need to invoke the control you wish to update.
if (somecontrol.InvokeRequired)
{
somecontrol.Invoke( /* ... */ );
}
else
{
// some code
}
Check out the Control.Invoke method on MSDN.
if (somecontrol.InvokeRequired)
{
somecontrol.Invoke( /* ... */ );
}
else
{
// some code
}
Check out the Control.Invoke method on MSDN.