Sub Activity_KeyPress(KeyCode As Int) As Boolean 'Return True to consume the event
If KeyCode = KeyCodes.KEYCODE_BACK Then
If Msgbox2("Exit app?", "Confirmation", "Yes", "", "No", Null) = DialogResponse.POSITIVE Then
Activity.Finish
End If
End If
Return True
End Sub