Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quit program and restart it automatically
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01291083
Message ID:
01291113
Vues:
8
>>Isn't there a way, perhaps using a Windows API, to exit a program and tell Windows to immediately restart it?
>
>Do you want the program to exit itself and launch another instance or have another program force it to close?
>
>If the program doesn't close (busy, locked up, whatever) how agressive do you want to be to close it? (end task, etc....)

Well, I kind of figured I could do something similar to what Dragan suggested before I even posted, but was thinking there was an API call designed for this. Anyway, I went ahead and implemented it using a Restart property on my application object. If Restart gets set to true - in this case due to a newer version of the program being downloaded - then the app does not finish loading and immediately before closing it uses ShellExecute to start itself again. This works. I thought I'd heard of a specific API for this type of thing, but maybe I was hallucinating.
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform