divya

divya

  • NA
  • 186
  • 112.1k

Conformation Message while closing the form?

Jul 11 2012 11:41 AM

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)