Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Send signals to each user using same system
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01293566
Message ID:
01293590
Views:
23
>I was wondering how I could send a message, or signal all users of the same system, that they needed to get out of the system for a few minutes for maintenance purposes? Has anyone done this?
>
>The executable for the system is run from each person's own workstation, so it is not a common executable run from the network.
>
>I was thinking that you could do a polling type thing and if a file were checked, say on the network, and once it appeared, the workstation executable would open that file and display the message that was sent, no matter what form was up, etc. Does that seem feasible?

Hi,

One of the methods is to add a timer to your app looking for the presence of particular file.
If file exists, then the timer displays the warning and calls another timer that closes the program in, say, 1-3 minutes.
This is what I am using:
* Application main, prg
....
Ltimer=createobject("ForceShutdown")
.....

*---------------------------
Define class ForceShutdown as Timer
	Interval = 5000
	Name = "ForceShutdown"
	Procedure Timer
		If file("coops.yyy")
			? chr(7)
			Wait window "A request to shutdown has been issued .... You have 1 minute to complete your work." timeout 10
			Ltimerclose=createobject("Closeit",60000)
		Endif
	Endproc
Enddefine
 
*----------------------------------------
Define class Closeit as Timer
	Interval = 10000
	Name = "CloseIt"
	Procedure INIT
		Lparameter pInterval
		release ltimer
		if type("pInterval")="N"
			this.Interval=pInterval
		endif
	endproc
	Procedure Timer
		do quit
	Endproc
Enddefine 
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform