[API]
ICONINFO
GetIconInfo
DeleteObject

[INCLUDE]
LoadCursor

[CODE]
Public Function GetOptCursorHotSpotOffset(ByRef OffsetX As Long, ByRef OffsetY As Long, Optional ByRef OffsetExtX As Long, Optional ByRef OffsetExtY As Long) As Boolean
  Dim xLong1 As Long
  Dim xType1 As ICONINFO
  
  xLong1 = LoadCursor(&H7F00&)
  If Not xLong1 = 0& Then
    If Not GetIconInfo(xLong1, xType1) = 0& Then
      If xType1.xHotspot > 16& Then
        OffsetX = 36& - xType1.xHotspot
        OffsetExtX = 16&
        Else
        OffsetX = 16&
        OffsetExtX = 4& + xType1.xHotspot
        End If
      If xType1.yHotspot > 16& Then
        OffsetY = 36& - xType1.yHotspot
        OffsetExtY = 16&
        Else
        OffsetY = 16&
        OffsetExtY = 4& + xType1.yHotspot
        End If
      GetOptCursorHotSpotOffset = True
      End If
    If Not xType1.hbmMask = 0& Then Call DeleteObject(xType1.hbmMask)
    If Not xType1.hbmColor = 0& Then Call DeleteObject(xType1.hbmColor)
    End If
  End Function
