using System; using System.Collections.Generic; using System.Windows.Forms; using System.Threading; namespace FileTransfer { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); Application.Run(new frmMain()); //Thread.Sleep(10000); } static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { MessageBox.Show(e.ExceptionObject.ToString()); } } }