private void Form1_FormClosing(object sender, FormClosingEventArgs e){ if (Flag == true) { var formClose = MessageBox.Show("Вы точно хотите завершить работу ?", "FormClose", MessageBoxButtons.YesNo); if (formClose == DialogResult.Yes) { Exit(); KILL(); } if(formClose == DialogResult.No) { } } } No matter what you click, the program will still close. Why is that?
ifto make areturn. - MaximK