DrawText Method

TextRenderer.DrawText Method

 

Draws the specified text at the specified location, using the specified device context, color, and font.

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticDrawText(IDeviceContext, String, Font, Point, Color)

Draws the specified text at the specified location using the specified device context, font, and color.

System_CAPS_pubmethodSystem_CAPS_staticDrawText(IDeviceContext, String, Font, Point, Color, Color)

Draws the specified text at the specified location, using the specified device context, font, color, and back color.

System_CAPS_pubmethodSystem_CAPS_staticDrawText(IDeviceContext, String, Font, Point, Color, Color, TextFormatFlags)

Draws the specified text at the specified location using the specified device context, font, color, back color, and formatting instructions

System_CAPS_pubmethodSystem_CAPS_staticDrawText(IDeviceContext, String, Font, Point, Color, TextFormatFlags)

Draws the specified text at the specified location using the specified device context, font, color, and formatting instructions.

System_CAPS_pubmethodSystem_CAPS_staticDrawText(IDeviceContext, String, Font, Rectangle, Color)

Draws the specified text within the specified bounds, using the specified device context, font, and color.

System_CAPS_pubmethodSystem_CAPS_staticDrawText(IDeviceContext, String, Font, Rectangle, Color, Color)

Draws the specified text within the specified bounds using the specified device context, font, color, and back color.

System_CAPS_pubmethodSystem_CAPS_staticDrawText(IDeviceContext, String, Font, Rectangle, Color, Color, TextFormatFlags)

Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions.

System_CAPS_pubmethodSystem_CAPS_staticDrawText(IDeviceContext, String, Font, Rectangle, Color, TextFormatFlags)

Draws the specified text within the specified bounds using the specified device context, font, color, and formatting instructions.

The text rendering offered by the TextRenderer class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the DrawString methods of the Graphics class.

Return to top
Show:
© 2016 Microsoft