Hello, I am writing an application that uses multiple threads (background workers).

When the user clicks the "Exit" button in my application the program exits, calling Application.Exit();. On the Application.OnExit event I have a few methods that are called to restore the user's system settings back to the way it was before my application was required to modify them.

Right now I am not using any specific code to handle the closing of threads. When you exit the application the application simply exits. Is there something that I should be doing before I exit my application? Is there some method I should be calling to deal with the threads that are most likely in the middle of processing something?

Also the threads are terminated by default when the Application.Exit() call is invoked, right?