how to unable the RETURN BUTTON?

jeronimovilar2

Member
Licensed User
Longtime User
the users "touch" the reset button and they don´t to know how to turn on my app. How can i unable the return button?
 

klaus

Expert
Licensed User
Longtime User
What button are you speaking of ?
You speak about a reset button and then about a return button.
If you are speaking about the Back button you can trap it with the code below :
B4X:
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
You cannot trap the Home button.

Best regards.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…