Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event
Dim result As Int
result = Msgbox2 ("QUIT?",KeyCode & " PRESSED","YES","","NO",Null)
If result=DialogResponse.POSITIVE Then
Msgbox ("Entered YES","")
Return False
Else
Msgbox ("Entered NO","")
Return True
End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
' If UserClosed = True Then
Msgbox("Activity closed in PAUSE EVENT","")
ExitApplication
' End If
End Sub