john1a98
Newbie level 3
- Joined
- Oct 27, 2013
- Messages
- 3
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 18
Hi,
I am new to c#. I am writing code to event handler when windowsform is closed
My code:
I do not understand why this code is not working.
Thanks in advance
John
I am new to c#. I am writing code to event handler when windowsform is closed
My code:
Code:
private void CANToolFormClosing(object sender, CancelEventArgs e)
{
DialogResult dr = MessageBox.Show("Do you want to exit from the application?", "Are you Sure???", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dr == DialogResult.No)
e.Cancel = true;
}
I do not understand why this code is not working.
Thanks in advance
John