Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quit program and restart it automatically
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01291083
Message ID:
01291113
Views:
9
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform