Returns the height of a text string as it would be displayed in the current font.
[nHeight =] [Form.]TextHeight(cText)
- Returns a value in pixels specifying the height of the text string.
- Specifies the character string for which the text height is determined.
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.