Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Performing action when application idle for x minutes

0 views
Skip to first unread message

Jon Buckheit

unread,
Oct 24, 2000, 12:06:25 AM10/24/00
to
Hi, I am trying to program a Delphi application to do something when it is
completely idle for x (user-defined) minutes, but am having problems. I
tried to use Application.OnIdle (to compare Now to an idle counter) and
Application.OnMessage (to set the idle counter to Now) but did not get
reliable results. Has anyone done this? Thanks!


Daniel J. Wojcik

unread,
Oct 24, 2000, 3:00:00 AM10/24/00
to

"Jon Buckheit" <jonbu...@home.com> wrote in message
news:5V7J5.350465$i5.54...@news1.frmt1.sfba.home.com...

> Hi, I am trying to program a Delphi application to do something when it is
> completely idle for x (user-defined) minutes, but am having problems. I
> tried to use Application.OnIdle (to compare Now to an idle counter) and
[...]

I'd use a TTimer and check for (lack of) keyboard and mouse messages to
indicate idleness.

A component I wrote does this, if you want to take a peek:

http://www.genjerdan.com/bfp/appkiller.htm

Alexander

unread,
Oct 24, 2000, 3:00:00 AM10/24/00
to
On Tue, 24 Oct 2000 13:26:54 +0200, "Daniel J. Wojcik"
<woj...@genjerdan.com> wrote:

>
>"Jon Buckheit" <jonbu...@home.com> wrote in message
>news:5V7J5.350465$i5.54...@news1.frmt1.sfba.home.com...

>> Hi, I am trying to program a Delphi application to do something when it is
>> completely idle for x (user-defined) minutes, but am having problems. I
>> tried to use Application.OnIdle (to compare Now to an idle counter) and

>[...]
>
>I'd use a TTimer and check for (lack of) keyboard and mouse messages to
>indicate idleness.
>
>A component I wrote does this, if you want to take a peek:
>
>http://www.genjerdan.com/bfp/appkiller.htm

Depending on what the app does, you might also want to set a flag if
the program is busy with non-user related tasks.

0 new messages