How to count idle time

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?TWFyaw==?=

    #1

    How to count idle time

    Is there a nice way to determine how long a keyboard/mouse has been idle? I
    was thinking the time could be recorded whenever a keydown or mousemove event
    fired and then have a timer fire periodically and compare Now to the recorded
    time. This though seems very cheesy and possibly inefficient.

    any thoughts?

    Thanks,
    Mark
  • Herfried K. Wagner [MVP]

    #2
    Re: How to count idle time

    "Mark" <Mark@discussio ns.microsoft.co mschrieb:
    Is there a nice way to determine how long a keyboard/mouse has been idle?
    I
    was thinking the time could be recorded whenever a keydown or mousemove
    event
    fired and then have a timer fire periodically and compare Now to the
    recorded
    time.
    <URL:http://dotnet.mvps.org/dotnet/code/misc/#UserIdle>

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

    Comment

    Working...