Results 1 to 4 of 4

Thread: How to disable .NET error messages (just terminate an app)

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2011
    Posts
    27

    Question How to disable .NET error messages (just terminate an app)

    Hello,
    Is there a way to disable .NET Framework "Unhandled Exception has occurred in your application. If you click Continue........." messages? In case the app crashes, I just want it to close without any messages.

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,413

    Re: How to disable .NET error messages (just terminate an app)

    use a try, catch block + handle the exception. you can close the app in the catch statement

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2011
    Posts
    27

    Re: How to disable .NET error messages (just terminate an app)

    Quote Originally Posted by .paul. View Post
    use a try, catch block + handle the exception. you can close the app in the catch statement
    That's what I tried to do actually... I am trying to do Application.Restart
    and then the above .net error shows up with an "Access Denied" message...

  4. #4
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,713

    Re: How to disable .NET error messages (just terminate an app)

    The following allows you (if you care too) not show a dialog and also not to crash upon the current exception unless that one generates another unhandled exception. I do not advise this but if that is your choice so be it.

    http://code.msdn.microsoft.com/Deali...ndled-9b933818

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width