Returns a position or dimension of a control or object relative to its form.
Syntax
OBJTOCLIENT(ObjectName, nPosition)
Returns
Numeric
Arguments
ObjectName
Specifies the name of the control or object for which the form position is returned.
nPosition
Specifies which form position or dimension of the control or object is returned. The following table lists the values for nPosition and the corresponding position or dimension returned.
nPosition | Position or dimension |
1 | Top |
2 | Left |
3 | Width |
4 | Height |
Remarks
OBJTOCLIENT( ) returns the position or dimension of a control or object relative to the client area of the form on which it resides. For example, a control or object can be placed on a page in a page frame, and the page frame is placed on a form. The Top, Left, Width, and Height properties return the position or dimension of a control or object relative to the page on which it is placed. However, you can use OBJTOCLIENT( ) to determine the position or dimension of a control or object relative to the form on which the page is placed.
The value returned by OBJTOCLIENT( ) is in pixels.