'Declaration
Public Function MeasureString( _ ByVal s As String, _ ByVal font As Font, _ ByVal layoutArea As Size, _ ByVal format As StringFormat _ ) As Size
public Size MeasureString( string s, Font font, Size layoutArea, StringFormat format )
Parameters
- s
- String to measure.
- font
- Font object defines the text format of the string.
- layoutArea
- Size structure that specifies the maximum layout area for the text.
- format
- StringFormat object that represents formatting information, such as line spacing, for the string.
Return Value
The MeasureString method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the DrawString method adjusts glyph points to optimize display quality and might display a string narrower than reported by MeasureString.