Event Function to automatically exit from the application

Post Reply
krume
Posts: 5
Joined: Thu Jul 31, 2014 7:26 pm

Event Function to automatically exit from the application

Post 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?
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Event Function to automatically exit from the application

Post by cnavarro »

C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
krume
Posts: 5
Joined: Thu Jul 31, 2014 7:26 pm

Re: Event Function to automatically exit from the application

Post 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
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Event Function to automatically exit from the application

Post 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
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Jack
Posts: 249
Joined: Wed Jul 11, 2007 11:06 am

Re: Event Function to automatically exit from the application

Post 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
Post Reply