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:

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:


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


Other GUI libraries will probably provide similar events.



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
Built with WebSharper