I'm trying to close the form window and exit from the application, by using the following code
The form is closed but the application is still running in the task manager.
Can someone please explain why it happens?
Application.ApplicationExit += new EventHandler(OnApplicationExit);
public void OnApplicationExit(object sender, EventArgs e)
{
Application.ExitThread();
}