[icq-devel] Input event, was(no subject)

ggr ggr at bak.rr.com
Fri Jan 3 22:41:32 CET 2003

1/2/2003 2:46:02 PM, Remy Lebeau <gambit47 at yahoo.com> wrote:

Turns out that GetLastInputInfo is the way to go, from it you get the number of ticks since last input event (for any input in windows , keyboard, mouse, form any app). With a quick call to GetTickCount in a timer that fires once a 
minute it is easy to set the AutoAway.

Here's my code:

  Lii.cbSize := SizeOf(Lii);
  If GetLastInputInfo(Lii) then Begin
    If (GetTickCount - Lii.dwTime) > (fAutoAwayCnt * 60000) Then

Thanks for the help, it pointed me in the right direction.


>You will probably need a global WH_MOUSE hook via the
>Win32 API function SetWindowsHookEx() implemented
>inside a DLL.
>The simplier alternative would be to simply call
>GetCursorPos() in a loop or separate thread and track
>when its current position changes.
>--- ggr <ggr at bak.rr.com> wrote:
>> How do I tell if someone moves the mouse (under
>> winNT/XP) while my program does not have focus?
>> I need to implement the auto away, but the
>> SetMouseCapture does not work the same in
>> winNT/XP as Win32.
>Do you Yahoo!?
>Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
>icq-devel - The forum for ICQ protocol discussion
>For unsubscribe and other mailing list info, see:

More information about the icq-devel mailing list