Page 1 of 1

Event Function to automatically exit from the application

Posted: Sat Aug 09, 2014 9:11 am
by krume
Dear All,

Please if you can tell me the syntax for the Event function to automatically exit from the application after certain period of time.
For example, FWH accounting application that I want to exit to Windows (destroy session and logout user) after for example 5 minutes of inactivity. Do I need to use Event function with some arguments, or there is some more elegant solution?

Re: Event Function to automatically exit from the application

Posted: Sat Aug 09, 2014 9:14 am
by cnavarro

Re: Event Function to automatically exit from the application

Posted: Sat Aug 09, 2014 5:04 pm
by krume
Thank you dear sir,
The examples has been written in objective clipper.
Please can you send me a link to similar explanation written in procedural code
Best regards,
krume

Re: Event Function to automatically exit from the application

Posted: Sat Aug 09, 2014 7:28 pm
by cnavarro
krume wrote:Thank you dear sir,
The examples has been written in objective clipper.
Please can you send me a link to similar explanation written in procedural code
Best regards,
krume
Sorry
I do not understand what you mean by "Objective Clipper" and "Procedural Code"
The example is written in Fivewin with Harbour

Re: Event Function to automatically exit from the application

Posted: Sun Aug 10, 2014 8:29 am
by Jack
Hi,
You have to use a timer .


DEFINE WINDOW oWnd FROM 0,0 TO 29,78 TITLE "Hematologie Pr Y Beguin:"+xxdroit+" "+mtmp+ ;
"=>"+msfx ;
BRUSH oBrush ;
MENU BuildMenu()
SET MESSAGE OF oWnd ;
TO "Dossier Hémato 2013-10 ~ (DMI.EXE 27~10~2013) "+FWVERSION ;
CENTERED DATE KEYBOARD 2007

DEFINE TIMER oTmr INTERVAL 10000 ACTION CheckT() OF oWnd
ACTIVATE TIMER oTmr

ACTIVATE WINDOW oWnd MAXIMIZED *

* ===
procedure CheckT(pr)
LOCAL hWnd,wjacfo,vdxx
static cteur:=1
if pr=NIL
cteur:=cteur+1
oWnd:Set("Timer:"+str(cteur,3,0)+"/300 ")
else
cteur:=pr && si param de reset
endif
*
*
if cteur > 300
cteur:=1
*
* *
*
*
oTmr:end()
*
close databases
set resources to
cteur:=1
*
oWnd:end()
quit
endif
*
RETURN