#region using System; using System.Threading; using System.Windows.Forms; #endregion namespace CSFrameworkV5.WCFTester { internal static class Program { private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { MessageBox.Show(e.Exception.Message); } /// /// 应用程序的主入口点。 /// [STAThread] private static void Main() { Application.ThreadException += Application_ThreadException; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new frmTester()); } } }