06-08-2012, 02:07 PM
Well, you just need to pop something like this into your code!!
Code:
Public Sub GetUserPermission(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
Dim response As DialogResult
response = MessageBox.Show("Do you really want to close?", "Really?", MessageBoxButtons.YesNoCancel) 'Show the message box
If Not (response = Windows.Forms.DialogResult.Yes) Then
'The user does not wish to close the form! Bail! Bail!!
e.Cancel = True
End If
End Sub