Protected Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs)
If MsgBox("Are you sure you want to exit?", MsgBoxStyle.YesNo, MsgBoxStyle.DefaultButton2, MsgBoxStyle.Exclamation) = MsgBoxResult.No Then
e.Cancel = True
End If
End Sub