static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ThreadException += Application_ThreadException; Application.Run(new Form1()); } private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { MessageBox.Show(e.Exception.ToString()); }
标签:ThreadException,C#,捕获,Application,static,void,winform From: https://www.cnblogs.com/blossomwei/p/17810063.html