, , . , Windows SEH 32- 64- Windows 8. , - , Load event OnLoad(). , Project + Properties, Build, Platform Target = AnyCPU, unick " 32-", .
, , Application.ThreadException . , :
#if (!DEBUG)
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException);
#endif
ThreadException, AppDomain.UnhandledException. #if - , , .
UnhandledException, Windows:
Environment.Exit(1);