The OBJECT GET SUBFORM CONTAINER SIZE command returns the width and height (in pixels) of a "current" subform object, displayed in the parent form.
This command must be called from the method of a form used as a subform and displayed in a subform object. It returns the width and height of the object containing the subform.
This command is useful, for example, in the case where subform objects must be moved and/or resized according to the characteristics of the subform object itself. In the On Load or On Resize form event, the subform can call this command to calculate the space at its disposal in order to display its contents.
- If the command is called from a form that is not being used as a subform, it returns the current size of the form window.
- If the command is called outside of the context of screen display (for example, during form printing), it returns 0 in width and height.