Input for WinForms
MeasureString メソッド

C1.Win.Input.8 アセンブリ > C1.Framework.Drawing.Gdi 名前空間 > Graphics クラス : MeasureString メソッド
String to measure.
Font object defines the text format of the string.
Size structure that specifies the maximum layout area for the text.
StringFormat object that represents formatting information, such as line spacing, for the string.
Measures the specified string when drawn with the specified Font object and formatted with the specified StringFormat object.
シンタックス
'宣言
 
Public Function MeasureString( _
   ByVal s As System.String, _
   ByVal font As Font, _
   ByVal layoutArea As System.Drawing.Size, _
   ByVal format As StringFormat _
) As System.Drawing.Size
public System.Drawing.Size MeasureString( 
   System.string s,
   Font font,
   System.Drawing.Size layoutArea,
   StringFormat format
)

パラメータ

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.

戻り値の型

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.
参照

Graphics クラス
Graphics メンバ