4
Answers

Conformation Message while closing the form?

divya

divya

12y
747
1

How to get conformation message while closing the form???

  private void btnClose_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Are You Sure To Close ?", "Close", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                this.Close();
            }
           
        }

And In form properties i changed cancleButton to  btnClose...

can any one help me?????
Answers (4)