[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()); } } }