Control.CheckForIllegalCrossThreadCalls Property
Gets or sets a value indicating whether to catch calls on the wrong thread that access a control's Handle property when an application is being debugged.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
When a thread other than the creating thread of a control tries to access one of that control's methods or properties, it often leads to unpredictable results. A common invalid thread activity is a call on the wrong thread that accesses the control's Handle property. Set CheckForIllegalCrossThreadCalls to true to find and diagnose this thread activity more easily while debugging.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
This is not true, CheckForIllegalCrossThreadCalls defaults to Debugger.IsAttached and can always be overriden.
- 5/21/2010
- Khabarakh