I
iDesmet
Hallo,
I have a Mdi form in which I show a MessageBox if the user tries to
close it. If the user clicks YES, then the form closes; if it clicks
NO then it aborts.
I added the following lines in my form Closing event:
If MessageBox.Show("Are you sure do you want to exit?", gsAppName,
MessageBoxButtons.YesNo, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button2) = Windows.Forms.DialogResult.Yes Then
Me.Close()
End If
But it doesn't work. So I was wondering if someone is so kind to point
me to the error.
I'm using VB.NET
Thanks in advance.
PS My apologies for my bad english.
Best Regards,
David Desmet
I have a Mdi form in which I show a MessageBox if the user tries to
close it. If the user clicks YES, then the form closes; if it clicks
NO then it aborts.
I added the following lines in my form Closing event:
If MessageBox.Show("Are you sure do you want to exit?", gsAppName,
MessageBoxButtons.YesNo, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button2) = Windows.Forms.DialogResult.Yes Then
Me.Close()
End If
But it doesn't work. So I was wondering if someone is so kind to point
me to the error.
I'm using VB.NET
Thanks in advance.
PS My apologies for my bad english.
Best Regards,
David Desmet