--
Thanks
Robert Lo
Application Developer
LogTech Canada Ltd
660, 10201 Southport Road S.W.
Calgary, Alberta
Canada T2W 4X9
Email:
EMAIL REMOVED
"EggHead" <EMAIL REMOVED> wrote in message news:GH4th.773721$1T2.555065@pd7urf2no...
Hi all,
My development environment is VB 6.0, and my OS is winxp. I would like to know how to find the mouse location at a control when the mouse is point at that control. The problem is that the mouse "whatever" events will not fire since the mouse is hjhack by other control. Anyway, I have the following code and I can check is the mouse over the control or not, however, I cannot find out where the mouse location at that control.
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
private sub mouseChecker()
Dim pnt As POINTAPI
Dim ConvertX As Double
GetCursorPos pnt
If WindowFromPoint(pnt.x, pnt.y) = Me.control1.hWnd Then
'I cannot find any method in finding the mouse location in that Visual basic control.
End If
end sub
thanks
Egghead