private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { System.Windows.Forms.MessageBox.Show("Exception: \r\n" + e.ExceptionObject.ToString()); }