home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / get_idl / readme.txt < prev    next >
Text File  |  1994-04-11  |  4KB  |  100 lines

  1. GetIdleTime() DLL Call and Sample Program.
  2. (c) 1994, Malik Information Services, All Rights Reserved
  3.  
  4. For more information on the products and services of MIS, Contact
  5.  
  6.     Malik Information Services
  7.     Attn: Nick Malik
  8.     21134 N.E. 5th Place
  9.     Miami, Florida 33179
  10.  
  11. Included:
  12.     TESTDLL.EXE - a VB program that uses the HOWLONG.DLL routines to display
  13.                   the time since last event, and the clock tick on which the
  14.                   event occured.
  15.     TESTDLL.FRM - The VB program source for TESTDLL.EXE
  16.     TESTDLL.FRX
  17.     TESTDLL.MAK
  18.  
  19.     HOWLONG.DLL - A DLL containing routines that track the last time that
  20.                   the user moved the mouse or pressed a key.
  21.  
  22. License Statement:
  23.  
  24.  This VB program, and the DLL that it calls, are property
  25.  of Malik Information Services.  A license is granted to any and
  26.  all users who would like to include any portion of either
  27.  the VB program or the DLL into their code, under the condition
  28.  that any such user agrees that Nicklas Malik, Malik Information
  29.  Services, and any of its employees, affiliates, distributors, or
  30.  directors, are not liable for any damages, special, incidental,
  31.  consequential or otherwise, arising out of the use of these programs.
  32.  
  33. Installation:
  34.    Copy HOWLONG.DLL into your /WINDOWS/SYSTEM directory.
  35.  
  36. The following routines are defined in the DLL:
  37.  
  38.    GetIdleTime - returns the tick count at the last mouse or keyboard event.
  39.  
  40.    ResetIdleOnUser - Sets or clears a flag allowing WM_USER messages to be
  41.          considered to be a keyboard event for the purposes of GetIdleTime.
  42.  
  43.  
  44. Full Descriptions:
  45.  
  46.    GetIdleTime
  47.    C:  DWORD FAR PASCAL GetIdleTime(void);
  48.    VB: Declare Function GetIdleTime Lib "HOWLONG.DLL" () As Long
  49.  
  50.    Parameters: None
  51.  
  52.    Function:   When any of the following Windows Messages is sent, to any
  53.                task, a Windows Hook routine defined in HOWLONG.DLL will
  54.                record the return value of the Windows API call 'GetTickCount'.
  55.                     WM_KEYDOWN 
  56.                     WM_LBUTTONDOWN 
  57.                     WM_MBUTTONDOWN 
  58.                     WM_RBUTTONDOWN 
  59.                     WM_NCLBUTTONDOWN 
  60.                     WM_NCMBUTTONDOWN 
  61.                     WM_NCRBUTTONDOWN 
  62.                     WM_MOUSEMOVE 
  63.                     WM_NCMOUSEMOVE
  64.                     WM_USER + any non-negative value 
  65.  
  66.                The WM_USER messages are included because the MS-DOS prompt
  67.                Window does not use the ButtonDown messages, or, in fact, any
  68.                Keypress messages at all.  When MS-DOS is displayed in a window, 
  69.                and the user is typing, without using the mouse, Windows will 
  70.                appear idle unless WM_USER messages are seen.  
  71.  
  72.                To tell the Hook routine to ignore User messages, see
  73.                the ResetIdleOnUser() routine, below.
  74.  
  75.    Returns:    The Windows Tick Count at last keyboard or mouse event.
  76.  
  77.    -------------------------------------
  78.    ResetIdleOnUser
  79.    C:  int FAR PASCAL ResetIdleOnUser(int bReset);
  80.    VB: Declare Function ResetIdleOnUser% Lib "HOWLONG.DLL" (ByVal bFlag%)
  81.  
  82.    Parameters: bReset - Integer 
  83.  
  84.    Function:   Allows the programmer to set or clear a flag used in the
  85.                detection of WM_USER events for GetIdleTime().
  86.  
  87.                If the value of the 'bReset' parameter is Zero, then WM_USER
  88.                messages will be ignored by the GetIdleTime() routine. If the 
  89.                value of 'bReset' is non-zero, then any Windows Message that 
  90.                is greater than or equal to WM_USER will be sufficient to cause
  91.                the GetIdleTime() routine to save the Tick Count.
  92.  
  93.                on Library initialization, WM_USER messages are seen.
  94.  
  95.                Calls to this routine do not cause the GetIdleTime() tick
  96.                count to be reset.
  97.  
  98.    Returns:    The previous value of the IdleOnUser flag.
  99.  
  100.