Detecting ArcGis Application Closure

960
2
06-18-2013 07:35 AM
ChrisMatthews
New Contributor III
I would like to detect the closure of ArcGIS.

I'm using VB.Net, ArcGIS 10.1.

I've succussfully wired an event for the CloseDocument Event, and it does fire when ArcGIS closes, but it also fires when a new document is created (without ArcGIS being closed), which isn't what I need.

I haven't been able to identify an event for Application closure.


Any help appreciated.

Regards

Chris
0 Kudos
2 Replies
NeilClemmons
Regular Contributor III
If you create an extension then you can implement IExtension.Shutdown.  Extensions are only unloaded when the application closes.
0 Kudos
ChrisMatthews
New Contributor III
Thanks Neil

I am using an Extension so this solution is an easy one to implement, and a quick test has given me good results.

Annoyingly, I had looked at this solution and discounted it (for a reason that I can't remember now).


Thanks again.

Chris
0 Kudos