FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Automatic application termination
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Automatic application termination
Posted: Wed Feb 20, 2008 06:10 PM

Hello, does anyone have a sample function that will automatically terminates an application if a user is not actively using the application. I need this function to automatically close the application in case a user forgets to close application at end of day so we can run of an automatic index routine. Thank you in advance for your help.

Regards,

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Automatic application termination
Posted: Wed Feb 20, 2008 06:25 PM

Darrell,

Here is an idea. Create a timer that checks the time of day every 30 mintues or so then if it is after a specified time, call wndMain():end().

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Automatic application termination
Posted: Wed Feb 20, 2008 11:46 PM
I hope I can help you ....

Local oOut
Local nTime:=0
Local oWnd

define window oWnd
....

DEFINE TIMER oOut INTERVAL  60000 OF oWnd ;
             ACTION (  nTime ++, if ( nTime == 1,( MsgInfo( OemToAnsi("Version 1.0 ( Demostration )." + CRLF +;
                      "Author" + CRLF + "name_application" + CRLF +"End of demostration") ),oWnd:END()),))

      ACTIVATE TIMER oOut


ACTIVATE WINDOW oWnd
Best Regards, Saludos



Falconi Silvio

Continue the discussion