System.Windows.Forms.Application.ApplicationExit

This is a delegate, so I think you probably call this as:

System.Windows.Forms.Application.ApplicationExit.Add(fun sender args -> ...);;

By on 11/17/2008 8:18 AM ()

Thanks Rob and divisortheory,

the Forms method does not work in standalone applications, i have defined:

1
let at_exit = System.AppDomain.CurrentDomain.ProcessExit.Add
By on 11/17/2008 10:41 AM ()

You expected to use the .NET events for this. If it's a console application you need to look at the events on the System.AppDomain class:

[link:msdn.microsoft.com]

If you're using winforms you want to look at System.Windows.Forms.Application:

[link:msdn.microsoft.com]

Other GUI libraries will probably provide similar events.

Cheers,

Rob

By on 11/17/2008 8:16 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper