TextRenderer::MeasureText Method

 

Measures the specified text when drawn with the specified font.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticMeasureText(IDeviceContext^, String^, Font^)

Provides the size, in pixels, of the specified text drawn with the specified font in the specified device context.

System_CAPS_pubmethodSystem_CAPS_staticMeasureText(IDeviceContext^, String^, Font^, Size)

Provides the size, in pixels, of the specified text when drawn with the specified font in the specified device context, using the specified size to create an initial bounding rectangle for the text.

System_CAPS_pubmethodSystem_CAPS_staticMeasureText(IDeviceContext^, String^, Font^, Size, TextFormatFlags)

Provides the size, in pixels, of the specified text when drawn with the specified device context, font, and formatting instructions, using the specified size to create the initial bounding rectangle for the text.

System_CAPS_pubmethodSystem_CAPS_staticMeasureText(String^, Font^)

Provides the size, in pixels, of the specified text when drawn with the specified font.

System_CAPS_pubmethodSystem_CAPS_staticMeasureText(String^, Font^, Size)

Provides the size, in pixels, of the specified text when drawn with the specified font, using the specified size to create an initial bounding rectangle.

System_CAPS_pubmethodSystem_CAPS_staticMeasureText(String^, Font^, Size, TextFormatFlags)

Provides the size, in pixels, of the specified text when drawn with the specified font and formatting instructions, using the specified size to create the initial bounding rectangle for the text.

Return to top
Show: