In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Program quit

Xailer professional forum in English
Responder
Maarten Roos
Mensajes: 126
Registrado: Lun Mar 29, 2010 10:24 am

Program quit

Mensaje por Maarten Roos »

What is the best way to remotely quit the program for every user? For example: I want to do maintenance and I want every user to quit, but they don't. How can I let the program stop immediately, even when the program is doing nothing?
I used the do in "getsys.prg", but I have no clue how to do no?
Someone got an idea or example?
Maarten
jlalin
Mensajes: 926
Registrado: Sab Dic 25, 2010 11:10 pm

Program quit

Mensaje por jlalin »

Maarten,
you can use a timer which checks for a file. If the file exists (you create
it when need to do maintenance) the application sets TApplication:lBusy to
.T., warns the user, closes all the files, etc. and then do the quit.
The most important part here is how you want to do it:
* if you want to prevent user data loss, then check what the user is doing.
If user is introducing an invoice, warn it (no messagebox, just a panel to
not wait him to click), give him 5 minutes, warn again and do the quit or
* if you don't care about user data loss, act like BOFH to make sure next
time they see the warning they will close the application, just quit. This
approach won't get you new friends but will do the work :-D
Regards,
José Lalí­n
Responder