I am using the following code to trap "back-button".
It works for the "dialogResponse.Positive" that is the program terminates.
but for "dialogResponse.CANCEL" I need to close the message and the Program
should stay active. What parameter should I use to respond to "Cancel" without
affecting the program itself. Need only to close the Message and the Program stays active. ?
Sub Activity_Keypress (KeyCode As Int) As Boolean
Dim Answ As Int
Dim Txt As String
Log(KeyCode)
If KeyCode=KeyCodes.KEYCODE_BACK Then
Txt = "Do you really want to Quit the Program ?"
Answ=Msgbox2(Txt,"ATTENTION","Yes","","Cancel",Null)
If Answ=DialogResponse.POSITIVE Then
ExitApplication
End If
If Answ=DialogResponse.CANCEL Then
---------????
End If
End If
End Sub
Regards
Benni
It works for the "dialogResponse.Positive" that is the program terminates.
but for "dialogResponse.CANCEL" I need to close the message and the Program
should stay active. What parameter should I use to respond to "Cancel" without
affecting the program itself. Need only to close the Message and the Program stays active. ?
Sub Activity_Keypress (KeyCode As Int) As Boolean
Dim Answ As Int
Dim Txt As String
Log(KeyCode)
If KeyCode=KeyCodes.KEYCODE_BACK Then
Txt = "Do you really want to Quit the Program ?"
Answ=Msgbox2(Txt,"ATTENTION","Yes","","Cancel",Null)
If Answ=DialogResponse.POSITIVE Then
ExitApplication
End If
If Answ=DialogResponse.CANCEL Then
---------????
End If
End If
End Sub
Regards
Benni