Const HC_SKIP = 2
Public Const HC_SYSMODALOFF = 5
Public Const HC_SYSMODALON = 4

Declare Function ScreenToClient Lib "user32" (ByVal hWnd As Long, lpPoint As
 POINTAPI) As Long

' To Report API errors:
Private Const FORMAT_MESSAGE_ALLOCATE_BUFFER = &amp;H100
Private Const FORMAT_MESSAGE_ARGUMENT_ARRAY = &amp;H2000
Private Const FORMAT_MESSAGE_FROM_HMODULE = &amp;H800
Private Const FORMAT_MESSAGE_FROM_STRING = &amp;H400
Private Const FORMAT_MESSAGE_FROM_SYSTEM = &amp;H1000
Private Const FORMAT_MESSAGE_IGNOR