konikula wrote: Can you pass me some comparable data from both routines?
I not sure which you meaning.
I try explain: I have listview with 4 columns. Mouse inside each column execute diffrent part of procedure. This is easy when calling mouseup with X and Y is predefine variables in procedure as you know. the X and Y of
Private Sub mylist_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Inside my mouseup procedure I check position of mouse, use simple if
If X>1950 and X<2450 then...
This tell me mouse is over column 2 because listview widths are fixed.
This part is good. I think form scale is look like Twips
But if I call from another function or procedure I want and must pass exact mouse position so the correct part of procedure is execute. So I need to know position of mouse BEFORE I call. I use API procedure but the postion it give is not Twips, but unknown scale.
I use standard API procedure from library.
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
X As Long
Y As Long
End Type
I call using
GetCursorPos Pt
So I get pt.x = horizontal and pt.y = vertical. I not use vertical.
The API pt.x is a very low number compare to mousup x
I hope you understand me. Sorry for bad english
-Viki-
Enter your message below
Sign in or Join us (it's free).