System.Threading.ThreadStateException
来源:互联网 发布:京东淘宝区别是什么 编辑:程序博客网 时间:2024/05/17 04:03
异常:“System.Threading.ThreadStateException”类型的未经处理的异常在 System.Windows.Forms.dll 中发生
其他信息: 在可以调用 OLE 之前,必须将当前线程设置为单线程单元(STA)模式。请确保您的 Main 函数带有 STAThreadAttribute 标记。
只有将调试器附加到该进程才会引发此异常。
分析:线程间操作产生的异常。
解决方案1:Control.CheckForIllegalCrossThreadCalls = false; //不太推荐
解决方案2:参见:http://blog.csdn.net/ilipan/article/details/46313811
0 0
- System.Threading.ThreadStateException
- 异常处理System.Threading.ThreadStateException
- 'System.Threading.ThreadStateException' occurred in "System.Windows.Forms.dll " in opencv1.1 version
- System.Threading
- System.Threading
- system.threading WaitHandle
- System.Threading.Timer 使用
- System.Threading.Thread类
- System.Threading.Timer
- 注解:System.Threading.Timer
- System.Threading.Mutex
- System.Threading.Timer应用
- System.Threading.Thread类
- System.Threading.Semaphore
- System.Threading 命名空间
- System.Threading.Thread.Sleep()
- System.threading <一> [EAggregateException]
- System.Threading.Timer的使用
- 2013年SAT真题精选
- Spark-streaming-杂
- Gradle学习系列之二——创建Task的多种方法
- Android中linux内核模块--开发设备驱动程序 && 上层接口实施
- SVN 冲突解决办法
- System.Threading.ThreadStateException
- 谷歌I/O 2015 android 新特性 Data Binding Library(一)
- Android System.gc()注意点
- VS代码生成工具ReSharper使用手册:配置快捷键
- Android版CSDN发现的一些问题
- 又换新工作了...
- Spark-streaming-scheduler
- Mac上使用命令行安装brew,并通过brew安装Ant等工具
- RDIFramework.NETV2.9版本 Web新增至14套皮肤风格+三套界面组合(共42套皮肤组合)