Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Created by Adam Rakaska
- * -> http://arakaska.wix.com/intelligentsoftware
- * -> http://csharpcodewhisperer.blogspot.com
- */
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Windows.Forms;
- using System.Threading;
- namespace Example_ThreadExceptionHandler
- {
- public partial class MainForm : Form
- {
- public MainForm()
- {
- InitializeComponent();
- }
- // Global event handler
- public static void MyExceptionHandler(object sender, ThreadExceptionEventArgs e) {
- MessageBox.Show(e.Exception.Message,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement