Event Function to automatically exit from the application

Event Function to automatically exit from the application

Postby krume » Sat Aug 09, 2014 9:11 am

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?
krume
 
Posts: 5
Joined: Thu Jul 31, 2014 7:26 pm

Re: Event Function to automatically exit from the application

Postby cnavarro » Sat Aug 09, 2014 9:14 am

Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6552
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Event Function to automatically exit from the application

Postby krume » Sat Aug 09, 2014 5:04 pm

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
krume
 
Posts: 5
Joined: Thu Jul 31, 2014 7:26 pm

Re: Event Function to automatically exit from the application

Postby cnavarro » Sat Aug 09, 2014 7:28 pm

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
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6552
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Event Function to automatically exit from the application

Postby Jack » Sun Aug 10, 2014 8:29 am

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
Jack
 
Posts: 288
Joined: Wed Jul 11, 2007 11:06 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 83 guests