Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automaticly closedown an application
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Automaticly closedown an application
Miscellaneous
Thread ID:
00330000
Message ID:
00330000
Views:
60
Hallo everyone
I have a problem, which I wonder if anyone can help me with!
Background:
When I want to change the structure on a table/database on a network, I must throw out all users from the application that uses the table, and then open it exclusively for modification.
The first way of throwing out users is to contact the network administrator, and let him close the application for everyone. That is a rather bad method, so I have made another solution.
When a user is running the application, there is a timer 'ticking' in the background. Every 10 minuets the timer calls a function that checks if a specific file exists on the hard disc (e.g. dummy.txt).
If there is no such file, nothing happens. If I have created the file (dummy.txt), the function starts another timer, counting down from e.g. 5 minuets and creates a "always on top, nocloseable form" that tells the user that the program will automatically closedown, and showing the time left before closedown in seconds. When the time reaches 0 a function is called that closes the application with the command "quit". This works excellent in most cases, even if the program is minimized, but 1 of 10 computers show the message "Cant quit FoxPro", and the program stops, with the user still online. I have tried with different commands such as "close all", "clear all" and so on… with the same result. It depends on what the user is doing in the program when the "close function" is trigged.
The question:
Is there any command I can use that automaticly close the program for the user, independent of what he is doing for the moment?
I am using VFP6.0

Thanks in advance, and hope you understand my bad English.
//Kjell Svedlund, from the land of the midnightsun!!!
Next
Reply
Map
View

Click here to load this message in the networking platform