1. 线程同步上下文 SynchronizationContext(线程安全)在构造函数中获取var syncContext=SynchronizationContext.Current;在线程中用syncContext.Post/Send(方法,object)调用方法。
2. 控件.Invoke/BeginInvoke(委托)
3. 用backgroundWork控件
4. 通过设置CheckForIllegalCrossThreadCalls属性