I have a WPF form with a couple of buttons, and for each button I have error handling code:
try {bla bla}
catch(Exception e){
more bla
}
If it is a WinForms app, you can encapsulate the Application.Run() call in a try catch statement, although I really wouldn't recommend this, you should only be using try catches where they are absoloutely needed and deal with exceptions whereever possible before just relying on catches.
I know this method works though as I had to use it temporarily once to do some cleaning up on the crashing of an application.