Class TVIdleTimer (unit VIdle)

Inherits from

TTimer

TVIdleTimer V1.01 - released January 25, 1998 Copyright (c) 1998 by Verisoft AG, Switzerland. Author: Wolfgang Rohdewald This component contains partial code from the TTimeoutDatabase by Demian. Demian can be contacted at demian@bhnet.com.br Disclaimer: This component is distributed as Freeware. There is no charge or warranty whatsoever. The author will not be held responsible for any direct or indirect damage resulting from the use of the component or any derivatives thereof. In short: USE IT AT YOUR OWN RISK! You are allowed to include the component code in any commercial or non commercial product. You are also allowed to make as many copies of the component as you want and distribute them, as long as you do not receive any money for the copying/distribution. You can send any comments, suggestions and bugs to wr@poboxes.com. The 16bit code is untested yet. I will probably never again use Delphi 1. If you do any modification to this code, please send me a copy. If you use this code on any 'real-life' application, please let me know. If you think this code is completely useless, please DON'T LET ME KNOW! What it does: TVIdleTimer is a descendent of TTimer with new properties and methods for determining the idle time of your application's user. How to use it: 1. Install the component; 2. Drop a TVIdleTimer component onto your form ; 3. Set the Timeout property; 4. Add a TimeOut Event Handler. It can read the IdleTime property By using the procedures Reset or ResetGlobal, you can also use this component for watching long batches: They should call Reset/Resetglobal regularly. If they don't, they have a problem, and your OnTimer event can abort them.

Constructors


constructor Create(AOwner: TComponent);

Public-Deklarationen


Functions

destructor Destroy;


function GetIdleMinutes: integer;


function GetIdleTime: TDateTime;


function GetLastActivity: TDateTime;


procedure SetEnabled(Value: Boolean);


procedure SetLastActivity(const t: TDateTime);


Properties

property Enabled : Boolean

Published-Deklarationen

property IdleMinutes : Integer

time passed since last user activity

property IdleTime : TDateTime

last user activity.

property LastActivity : TDateTime


Events

Variables

FEnabled : Boolean;

Private-Deklarationen


Constructors


constructor Create(AOwner: TComponent);

Public-Deklarationen


Functions


destructor Destroy;


function GetIdleMinutes: integer;


function GetIdleTime: TDateTime;


function GetLastActivity: TDateTime;


procedure SetEnabled(Value: Boolean);


procedure SetLastActivity(const t: TDateTime);


Properties


property Enabled : Boolean

Published-Deklarationen


property IdleMinutes : Integer

time passed since last user activity


property IdleTime : TDateTime

last user activity.


property LastActivity : TDateTime


Events


Variables


FEnabled : Boolean;

Private-Deklarationen