Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shutdown Timer....

Status
Not open for further replies.

RFanslow

Programmer
Jul 16, 2014
24
US
Hi All

seem to be having an issue with a simple shutdown timer....

simple basics, a simple app built as an exe
sitting in a main window, menu waiting for a user, timer loaded to _Screen
SET CLASSLIB TO "fanz.vcx" addi
_Screen.AddObject("oTimer","fTimer")
_screen.oTimer.Filename = "e:\prod\shutdown.epo" && filename used to trigger shutdown
_screen.oTimer.WhichApp = "EPO" && Which System (EPO - GISMO)
_screen.oTimer.Interval=20000 && 2000 Milliseconds (20 Seconds)


this timer will not fire unless there is a form visible...

we have many users working in a VM/remote desktops that leave the system up and running, maintenance is needed and files are open, need a way to force a shutdown, currently we force the files/sessions closed from with the windows computer management system which leads to tech support tickets

Any idea's why it wont fire
 
Well, what's the fTimer code?

And is there any code anywhere in the app making any essential settings to _screen.oTimer, eg setting enabled .f.? Or is it .f. by class definition and only started by the first form? Any code also setting up another timer as _screen.oTimer?

I'd do a code references search on _SCREEN, only _screen, not _screen.oTimer, there could also hide something like WITH _SCREEN only acting on .oTimer, then again .oTimer might also find any other timer used.

Bye, Olaf.
 
this timer will not fire unless there is a form visible...

What's going on when there isn't a screen visible? In older versions of VFP, timers won't fire (by design) if a menu is open. Is the timer disabled?
 
I tend to attach such timers to the application object, not to _SCREEN. I don't know why it wouldn't work with _SCREEN, but maybe having it hidden is causing a problem.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top