Hi there 
I'm trying to display a message box on an exit event and have used the following code, but i get an error: e.cancel is not a member of system.eventargs. Could sum1 pls tell me where i'm going wrong. Thanx.
Private Sub mnuFileExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFileExit.Click
'before closing make sure the data is pushed back to the database!
Me.Close()
If MessageBox.Show("Are you sure you want to exit?", "Exit", _
MessageBoxButtons.YesNo, MessageBoxIcon.Question) _
= DialogResult.No Then
e.cancel = True
End If
End Sub
I'm trying to display a message box on an exit event and have used the following code, but i get an error: e.cancel is not a member of system.eventargs. Could sum1 pls tell me where i'm going wrong. Thanx.
Private Sub mnuFileExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFileExit.Click
'before closing make sure the data is pushed back to the database!
Me.Close()
If MessageBox.Show("Are you sure you want to exit?", "Exit", _
MessageBoxButtons.YesNo, MessageBoxIcon.Question) _
= DialogResult.No Then
e.cancel = True
End If
End Sub