andrew4582

ThreadException - WinForms

Nov 8th, 2011
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1.   static void Application_ThreadException(object sender,System.Threading.ThreadExceptionEventArgs e) {
  2.             if(e.Exception == null || Form.ActiveForm == null)
  3.                 return;
  4.             MessageBox.Show(
  5.                     Form.ActiveForm,
  6.                     e.Exception.Message,Application.ProductName,MessageBoxButtons.OK,icon :MessageBoxIcon.Error);
  7.         }
Advertisement
Add Comment
Please, Sign In to add comment