Class TETimer (unit ETimer) |
TTimer
Enhanced Timer V1.00 - released June 09, 1998 Copyright (c) 1998 by Demian 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 demian@bhnet.com.br New versions can be found at: http://www.bhnet.com.br/~demian http://web.unix.horizontes.com.br/~demian 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: TTimer descendent with a new property, Snooze, that keeps a counter of miliseconds elapsed since the last time the user moved/clicked the mouse or pressed a key. Useful to implement timeout routines. How to use it: 1. Install the component [VNM Pallete]; 2. Drop one or more TETimer onto a form; 3. Use the component as you would use a regular TTimer. The only difference is the new Snooze property, that can be consulted/edited at run-time. For example, the following code (OnTimer event) emits a sound whenever the application stays idle for more than one minute: procedure TForm1.ETimer1Timer(Sender: TObject); begin with TETimer(Sender) do if Snooze > 60000 then begin MessageBeep(MB_OK); Snooze := 0; end; end;
Constructors |
Functions |
Properties |
Events |
Variables |
Constructors |
______________________________________________________________________________
Functions |
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Properties |
Events |
Variables |