hello,
for your idle timer why do you not use the component tidletimer ( system components tab) ?
Blaazen in another post explains what is it :
Well, when TIdleTimer.AutoEnabled=False then it behaves just like normal TTimer.
If you switch to Enabled:=False and AutoEnabled:=True then (in default configuration, i.e. AutoStartEvent=itaOnIdle and AutoEndEvent=itaOnUserInput) this timer raises events on IDLE (= when nothing happens, i.e. you don't move move, no clicks, no keyboard input etc.)
so, to use this component in a form for no activity detection, for example put a tidletimer in your form with properties :
AutoEnabled : True
AutoEndEvent : itaOnUserInput
AutoStartEvent : itaOnIdle
Enabled : False
Interval : 60000
and for OnTimerEvent this procedure :
procedure TForm1.IdleTimer1Timer(Sender: TObject);
begin
showmessage('no activity during one minut');
end; Friendly, J.P