ObjToClient()
The position properties of an object are always relative to the object's container. That is, when you put a text box on a page of a page frame, the text box's Left and Top tell you where it is on that page. Occasionally, what you really want to know is where the object is on the form. That's what OBJTOCLIENT() is all about. You hand it an object and it tells you something about that object with respect to the form that contains it.
Usage |
nResult = OBJTOCLIENT( oObject, nMeasurement ) |
Parameter |
Value |
Meaning |
oObject |
Object |
The object for which you want to know the position. |
nMeasurement |
1 |
Return the top of oObject relative to the form. |
2 |
Return the left edge of oObject relative to the form. |
|
3 |
Return the width of oObject in pixels. |
|
4 |
Return the height of oObject in pixels. |
Example |
? OBJTOCLIENT( ThisForm.PageFrame1.Page1.Checkbox1, 1 ) * Returns distance in pixels from left edge of form to left * edge of checkbox |
See Also |