raja ramesh

raja ramesh

  • NA
  • 50
  • 108.7k

Winform is closed but it is still running in the program list via Task Manager

Oct 11 2011 8:09 AM
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#?


Answers (3)