Página 1 de 1

Program quit

Publicado: Lun Mar 28, 2011 3:37 pm
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

Program quit

Publicado: Lun Mar 28, 2011 5:17 pm
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