VB Code:
Private Const WM_MOUSEMOVE = &H200
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
' to send the message ...
PostMessage m_hWnd, WM_MOUSEMOVE, 0, MAKELONG(0, -32768)
Public Function MAKELONG(wLow As Long, wHigh As Long) As Long
MAKELONG = LOWORD(wLow) Or (&H10000 * LOWORD(wHigh))
End Function
VB Code:
' the form has to have the ScaleMode set to pixels, otherwize you will have to convert the Y to pixels...
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Y = -32768 Then
' message received
End If
End Sub