Sub Activity_KeyPress (KeyCode As Int) As Boolean
Select KeyCode
Case KeyCodes.KEYCODE_BACK
Dim m As Int
m = Msgbox2("Are you sure to close this app?", "Confirmation", "Yes", "", "No", Null)
If m = DialogResponse.POSITIVE Then
ExitApplication
Else
Return True
End If
End Select
End Sub