不支持一个 STA 线程上针对多个句柄的 WaitAll

[csharp] view plaincopy
using System;  
using System.Collections.Generic;  
using System.Windows.Forms;  
  
namespace WindowsApplication1  
{  
    static class Program  
    {  
        /// <summary>  
        /// 应用程序的主入口点。  
        /// </summary>  
        [MTAThread] //不支持一个 STA 线程上针对多个句柄的 WaitAll。解决办法把STAThread改成MTAThread  
        static void Main()  
        {  
            Application.EnableVisualStyles();  
            Application.SetCompatibleTextRenderingDefault(false);  
            Application.Run(new Form1());  
        }  
    }  
}  

  

posted on 2014-03-28 18:38  Kingly  阅读(680)  评论(0编辑  收藏  举报