API apiGetWindowRect worked perfectly to resolve my questions. It took a few minutes to discover that the API functions GetXCursorPos() and GetYCursorPos() return the coordinates in Pixels, so one has to convert them to twips to be consistent with any other values expressed in twips as calculations follow. There are 15 twips per pixel.
Thanks,
Bill
Code:
Option Compare Database
Option Explicit
Private Type POINTAPI
X As Long
Y As Long
End Type
Type RECT_Type
left As Long
top As Long
right As Long
bottom As Long
End Type
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Declare Function apiGetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hWnd As Long, lpRect As RECT_Type) As Long
Public Function GetXCursorPos() As Long
Dim pt As POINTAPI
GetCursorPos pt
GetXCursorPos = pt.X
End Function
Public Function GetYCursorPos() As Long
Dim pt As POINTAPI
GetCursorPos pt
GetYCursorPos = pt.Y
End Function