I have this Window Form and what i need is that when i close the form by pressing [x] in the window, i need to show a message.
This is not working: Any idea why?
private void ControlCom_Closing(object sender, FormClosingEventArgs e)
{
MessageBox.Show("test");
}
I just need to display the message on button x click. But this doesn't display the message box.
Shuld i add anything else there or something? I read there is a closereason but mybe it's not the case.