Thursday, 1 August 2013

MessageBox on closing event By:Tanuj Kumar

MessageBox on closing event

MessageBox on closing a form:

MessageBox on closing event:
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
                        {
                           
 if (MessageBox.Show("Are You want To Close","Warning",MessageBoxButtons.YesNo) == DialogResult.No )
                           
                         {

                               
                                e.Cancel = true;
                            
                            }



Posted By:Tanuj Kumar 

0 comments:

Post a Comment