Jobs
Author: Gehan Fernando. Date Submitted: 9/17/2007 Category: Forms Compatibility: .NET This code has been accessed 5294 times.
Email Yourself this snippet:
Rem -----------
Code
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing Dim _msgresult As DialogResult _msgresult = MessageBox.Show("Do You Want To Close This Form ?", "Close Form", MessageBoxButtons.YesNo, MessageBoxIcon.Information) If _msgresult = Windows.Forms.DialogResult.Yes Then e.Cancel = False Else e.Cancel = True End If End Sub