Untitled
By: a guest | Apr 26th, 2010 | Syntax:
VB.NET | Size: 0.38 KB | Hits: 114 | Expires: Never
Public Class Form1
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
If MessageBox.Show("Are you sure you want to exit?", "Confirm exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.No Then
e.Cancel = True
End If
End Sub
End Class