Hey, I would like to show a prompt when a user clicks on the "X" button on my form, but it doesn't seem to be working.. Here is the code:
private void Form_FormClosing(object sender, FormClosedEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
MessageBox.Show("YES");
}
}
Any ideas?