FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Event Function to automatically exit from the application
Posts: 5
Joined: Thu Jul 31, 2014 07:26 PM
Event Function to automatically exit from the application
Posted: Sat Aug 09, 2014 09: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?

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Event Function to automatically exit from the application
Posted: Sat Aug 09, 2014 09: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
Posts: 5
Joined: Thu Jul 31, 2014 07:26 PM
Re: Event Function to automatically exit from the application
Posted: Sat Aug 09, 2014 05: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

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Event Function to automatically exit from the application
Posted: Sat Aug 09, 2014 07: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
Posts: 300
Joined: Wed Jul 11, 2007 11:06 AM
Re: Event Function to automatically exit from the application
Posted: Sun Aug 10, 2014 08: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

Continue the discussion