Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quit program and restart it automatically
Message
 
À
09/02/2008 14:14:01
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
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:
01291098
Vues:
9
>>Isn't there a way, perhaps using a Windows API, to exit a program and tell Windows to immediately restart it?
>
>You can call your own exe again using shellexecute() and then quit the current one, but the timing may be bad - if your app does a lot of housekeeping on exit, the new instance may already be half loaded while the old one exits.
>
>You may try to use Windows scheduler and make the app run in a couple of seconds - run the scheduler via its API or as another shellexecute() call - and make this the last thing your app does in your On("shutdown") code, i.e. after you've closed all tables, released all forms, killed all nasty timers you hid in the attic, released all the libraries you kept in the dungeons etc.

Thanks, I was hoping for a cleaner way, but maybe someone will offer up the magical API call I need. I looked around on News2News, but am not sure exactly how to search for this (perhaps nonexistent) API function.
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform