p_gauri7
asked on
Capture form event after an unhandled exception
Hi,
I am developing an application in VB.NET and have come across this problem:
Sometimes the application throws an unhandled exception and when the user presses break OR continue on the dialog box, it closes the form (which is OK). In this scenario, I would like to capture an event of the form (i.e. before the form unloads) to set up a flag in the database. IF the application unloads normally, the flag is set in form_closed event- which is not fired in case of an exception. Is there any way to capture one event which (after the user responds to the dialog of unhandled exception) can be used to set the flag?
-Gauri
I am developing an application in VB.NET and have come across this problem:
Sometimes the application throws an unhandled exception and when the user presses break OR continue on the dialog box, it closes the form (which is OK). In this scenario, I would like to capture an event of the form (i.e. before the form unloads) to set up a flag in the database. IF the application unloads normally, the flag is set in form_closed event- which is not fired in case of an exception. Is there any way to capture one event which (after the user responds to the dialog of unhandled exception) can be used to set the flag?
-Gauri
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks again,
-Gauri