Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MROW() or similar - relative position
Message
From
16/04/1998 17:40:17
 
 
To
16/04/1998 16:52:47
Tim Hockin
Illinois State U - Residential Computing
Normal, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00092696
Message ID:
00092711
Views:
17
Tim,

Too rushed to check right now, but maybe OBJTOCLIENT() will help???

Good luck,
Jim N

>Is there any simple (fast) way to get the current mouse position relative to the conatiner (not form) the mouse is in?
>
>e.g. - mouse clicks on a container and holds...if mouse moves outside the container - I need to do something. I have a timer, and each loop thru it checks the MCOL() and MROW() values against THIS.LEFT etc. BUT if this class is inside another container (which it is) THIS.Left = 0 (or small number).
>
>What I need is a mechanism of finding out the position of the mouse in a container, or finding the absolute LEFT, TOP of a container.
>
>Right now I am using:
>
>LOCAL o
>
>o = THIS.Parent
>
>lnX = MCOL(THISFORM.Name, 3)
>lnY = MROW(THISFORM.name, 3)
>
>DO WHILE (o.baseclass "Form")
> lnX = lnX - o.LEFT
> lnY = lnY - o.TOP
> o = o.Parent
>ENDDO
>
>Problem is - some classes (namely a "page") do not have LEFT or TOP properties. and this loop is slow in a 30 ms timer loop...
>
>Using VFP 5, btw..
>
>Thanks in advance
>Tim
Previous
Reply
Map
View

Click here to load this message in the networking platform