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.hWn d Then
'I cannot find any method in finding the mouse location in that Visual basic control.
End If
end sub
thanks
Egghead
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.hWn d Then
'I cannot find any method in finding the mouse location in that Visual basic control.
End If
end sub
thanks
Egghead
Comment