TextHeight Method

Applies To   See Also

Returns the height of a text string as it would be displayed in the current font.

Syntax

[nHeight =] [FormSet.]Object.TextHeight(cText)

Arguments

nHeight

Returns a value in pixels specifying the height of the text string.

cText

Specifies the character string for which the text height is determined.

Remarks

The TextHeight method determines the amount of vertical space required to display cText. The height returned includes the leading space above and below the character string, so you can use the height returned to calculate and position multiple lines of text within the form. If cText contains embedded carriage returns, the TextHeight method returns the cumulative height of the lines, including the leading space above and below each line.