Winform is closed but it is still running in the program list via Task Manager
Hi,
I have written a windows application and when I try to exit the program with the following code
private void KYRPlusRadForm_FormClosing(...)
{
var res1 = MessageBox.Show(this, "Are yor sure?", "Exit",
MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (res1 == DialogResult.No)
{
e.Cancel = true;
}
else
{
this.Dispose();
}
}
private void KYRPlusRadForm_FormClosed(object sender,
FormClosedEventArgs e)
{
Application.Exit();
}
the form is closed, but it is still running in the program list via Task Manager.
How do you close and exit a program perminantly in C#?