Sub Activity_KeyPress (KeyCode As Int) As Boolean
'return true if you want to consume the event
If KeyCode = KeyCodes.KEYCODE_BACK Then
' If Msgbox2("Do you want to close?", "", "Yes", "Cancel", "No", Null) = DialogResponse.POSITIVE Then
***mypnl.visible=true, plus your solution, to go in here***
Return False
Else
Return True
End If
'End If
End Sub