Hi,
**
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Dim dlgres As DialogResult = _
MessageBox.Show("Are you shure you want to close this
widnow?", _
"MyApp", _
MessageBoxButtons.YesNo, _
MessageBoxIcon.Question)
If dlgres = DialogResult.No Then
e.Cancel = True
End If
End Sub
**
Regards,
Josip Habjan
URL:
http://www.habjansoftware.com
"Sameh Ahmed" <es******@hotmail.com> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl...
Hello there
IS there a way to cancel a form close after the user clicks on the close
button?
I want to confirm from the user the close operation and if he chooses not
to, I would cancel the operation
any ideas?
Regards
Sameh