>I wrote a small form to accept date & time via a calendar control & spinners.
>
>I want to be able to "do form frmTimeDate with oObject, n"
>
>where n is a # representing where the form should appear (top, left, bottom, right) of the object.
>
>oObject.left and oObject.top are in releation to the FORM they apper on; but a forms .left and .top are in relation to the screen.
>
>How can I get object's position in relation to the screen?
>
>The only thing I figured out was to get the ojbect's form's LEFT/TOP properties and add that to the objects left/top properites.
>
>Is that the best way?
>
>Thanks
Hi Josh,
The top and left coordinator of an object on a form do not include either the title bar for the top, or the width of the frame. You need to adjust accordingly. You can get these values using the SYSMETRIC() function, passing the appropriate parameters and making the calculations yourself. Also, you might want to look at the OBJTOCLIENT() function if the object is part of a container.
George
Ubi caritas et amor, deus ibi est