Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Application has stopped responding

Application has stopped responding

Scheduled Pinned Locked Moved C#
csharpwinformsdata-structuresdebugginghelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eljainc
    wrote on last edited by
    #1

    Hello, I am receiving an "Application has stopped working" error in my C# WinForms application. The running OS versions are Windows 7 Home Premium, Windows 7 Professional and also a few WinXP Home machines. I have an exception handler set up in my code: public void MyExceptionHandler (Object sender, ThreadExceptionEventArgs e) { MessageBox.Show("Internal Error" + "\r\n\r\n" + e.Exception.Message + "\r\n\r\n" + "Stack Trace: " + e.Exception.StackTrace, "Oslermedicine® Manager Notification"); } This code is never called for some reason and Windows handles any errors. I set up the ThreadException in my _load event for the main form: Application.ThreadException += MyExceptionHandler; What would cause this behavior? I tried to put it in the main loop but then the program becomes very unstable, crashing on other handlers. Thanks Mike

    Richard Andrew x64R 1 Reply Last reply
    0
    • E eljainc

      Hello, I am receiving an "Application has stopped working" error in my C# WinForms application. The running OS versions are Windows 7 Home Premium, Windows 7 Professional and also a few WinXP Home machines. I have an exception handler set up in my code: public void MyExceptionHandler (Object sender, ThreadExceptionEventArgs e) { MessageBox.Show("Internal Error" + "\r\n\r\n" + e.Exception.Message + "\r\n\r\n" + "Stack Trace: " + e.Exception.StackTrace, "Oslermedicine® Manager Notification"); } This code is never called for some reason and Windows handles any errors. I set up the ThreadException in my _load event for the main form: Application.ThreadException += MyExceptionHandler; What would cause this behavior? I tried to put it in the main loop but then the program becomes very unstable, crashing on other handlers. Thanks Mike

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      There is also an "UnhandledException" delegate in the Application class that you should assign your handler to.

      The difficult we do right away... ...the impossible takes slightly longer.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups