PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Windev Mobile 18 - Closing App
Windev Mobile 18 - Closing App
Iniciado por guest, 24,jun. 2015 11:49 - 5 respuestas
Publicado el 24,junio 2015 - 11:49
Hi all,

Can anyone please advise me on if somethign is possible for a mobile application...

On smartphones you now obviosuly have the 'back' button which is located as a touch button on the phone. If a user touches this icon whilst using a windev application, it closes the application and all is lost.

Is there a way that is a user touches this icon whilst in the windev application, you can pop a message that says 'Are you sure you want to quit the application?'

Any advise would be very much appreciated :D
Publicado el 24,junio 2015 - 12:02
Hi Ben,

a button of type "cancel" will do. Just put your code in the on-click event of this button.
Publicado el 24,junio 2015 - 12:07
Hi.

You must put a button out the device screen. The button must be of "Cancel" type and with "Visible" state. In the "click" code of the button you can write the code to ask for close the window.


Rubén
Publicado el 26,junio 2015 - 13:21
Hi Ben,

Make sure the BTN control is on Plane 0. You can make the dimensions tiny so people won't see it, but as stated above, you need to make sure it IS set to Visible.

Some example code to put in Click event would be:

NextTitle("Exit the App?")
IF YesNo("Do you wish to exit the application?")=Yes THEN
EndProgram()
ELSE
ReturnToCapture(MySelf)
END

Cheers
Piotr
Publicado el 26,junio 2015 - 13:50
Hi,

You can also drag it off screen, on plane 0.

I usually put it to the left, no anchors.
Publicado el 29,junio 2015 - 11:57
Thank you very much everyone!!!