Expand Minimize
This topic has not yet been rated - Rate this topic

TextHeight Method

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


 [nHeight =] [Form.]TextHeight(cText)

Parameters

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.

Applies To: Form | _SCREEN

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.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.