When the user hit the exit button,It shows the message box like "Are you sure to exit" with yes/no option.
Code here,
==================
Private Sub Form2_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim a As Integer
a = MessageBox.Show("Are you sure to close", Text, MessageBoxButtons.YesNo)
If a = 6 Then
'Application.Run()
e.Cancel = False
Else
'Application.Exit()
e.Cancel = True
End If
End Sub
======================
|