I need a way to detect when my application is terminated either through the Task Manger or by shutting down Windows, so I can run some code. The FormClosing event does not seem to catch these. Is there a way that I can do this? Thanks...