Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event
Dim Answ As Int
If KeyCode = KeyCodes.KEYCODE_BACK Then
Answ = Msgbox2("Do you want to quit the program ?", _
"A T T E N T I O N", "Yes", "", "No", Null)
If Answ = DialogResponse.NEGATIVE Then
Return True
End If
End If
Return False
End Sub