if you are using vs 2005...

in the ide, press Ctrl+Alt+E
check all the boxes...click ok

re-run with the debugger attached.
it should break on an exception for you somewhere.


-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] Behalf Of Jekke Bladt
Sent: Wednesday, June 06, 2007 1:24 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Guaranteeing code will run at shutdown


I've done that. The code just literally stops executing at some arbitrary
point due to application shutdown.

--Jekke

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Gaurav Khanna
Sent: Wednesday, June 06, 2007 12:48 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Guaranteeing code will run at shutdown


Hi Jekke,

Can you put up a try/catch in the Close handler to see if any exception is
being thrown during the execution of that code?

Cheers!
Gaurav
WinToolZone - http://www.wintoolzone.com/
Inside and Out - http://www.wintoolzone.com/blog/


> -----Original Message-----
> From: [EMAIL PROTECTED]
> Sent: Tue, 5 Jun 2007 17:42:50 -0400
> To: advanced-dotnet@discuss.develop.com
> Subject: [ADVANCED-DOTNET] Guaranteeing code will run at shutdown
>
> All--
>
> I have a WinForms application that must run a certain block of code
> before shutting down. (Obviously, crashes can't be helped. I'm talking
> about orderly shutdowns.) Shutdown is triggered by the closing of a main
> form and the shutdown code currently executes in the handler for the main
> form's .Closing event handler.
>
> However, the application often seems to close before all of the code in
> the .Closing handler. Is there any way to prevent this?
>
> TIA
>
> --Jekke
>
> ===================================
> This list is hosted by DevelopMentor.  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

____________________________________________________________
GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at
http://www.inbox.com/smileys
Works with AIM(r), MSN(r) Messenger, Yahoo!(r) Messenger, ICQ(r), Google
Talk(tm) and most webmails

===================================
This list is hosted by DevelopMentor   http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor.  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to