Msdn:
If the thread that tries to access the method or attribute of the control is not the thread that creates the control, it will usually lead to unpredictable results. Generally, invalid thread activity is intended for access controlHandleAttribute error thread call. SetCheckforillegalcrossthreadcilsSetTrueIt is easier to find and diagnose the thread activity during debugging. Start the application outside the debugger.ProgramIf the cross-thread call is invalid, an exception is always thrown.
Windows Forms controls are not thread-safe in nature. If two or more threads operate on the status of a control, the control may be forced to enter an inconsistent state. Other thread-related bugs may also occur, including contention and deadlocks. It is important to ensure that controls are accessed in a thread-safe manner.
However, you can disable this exception by setting the value of the checkforillegalcrossthreadcils attribute to false. This causes the control to run in the same way as in Visual Studio 2003.
Code:
Control. checkforillegalcrossthreadcils = false;