Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to SHUTDOWN an App.
Message
 
À
05/07/2007 15:24:06
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01238049
Message ID:
01238085
Vues:
13
>>Hello Fox Gang!
>>
>>Today's question.....
>>
>>How to shutdown an app using a timer.
>>
>>Given I have an app, and I have a timer running in the base application form.
>>
>>The timer, when it fires, looks for a textfile in the root folder. If the file is there, it causes the app to begin to shutdown....
>>
>>Here is the relevant code...
>>
>>IF timetoshutdown
>> WAIT CLEAR
>> THISFORM.RELEASE()
>>ENDIF
>>
>>But, since there may be many forms on the screen at this time (someone may have left the app running when they went home)... I would rather have a shutdown routine instead of just THISFORM.RELEASE().
>>
>>Any ideas of a shutdown routine? I am assuming it would have to be able to drill down into the forms to shut them all down???
>>
>>Thanks!
>>Tommy
>
>Well, I 'spect you have some command you invoke when the user presses Alt-F4, or selects "File | Quit". Just use the same command.
>
>Note: In my case, that would be the Visual Extend method, goProgram.OnQuit(), where goProgram is the application object. However, this method is not foolproof; some user may have pending changes; in this case, .OnQuit() will not quit immediately, but ask the user for input. It DOES work most of the time.
>
>FAQ #7896 by Ramon Jaquez, which I only started using recently, has also proved immensely valuabe for those maintenance tasks. (Note: It says Windows NT, but also works under Windows XP; you DO need administrative privileges for the server.)

Where is the FAQ located?

>
>With this latter FAQ, you can tell who is using a particular file, and ask just those users to please close a window, or the application.

Thanks for the info...

Tommy
Tommy Tillman A+ NetWork+ MCP
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform