System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetTextExtent Method

Returns the size and location of the specified string when drawn with the font of the current visual style element.

Syntax

public System.Drawing.Rectangle GetTextExtent (System.Drawing.IDeviceContext dc, string textToDraw, System.Windows.Forms.TextFormatFlags flags)

Parameters

dc
The System.Drawing.IDeviceContext this operation will use.
textToDraw
The string to measure.
flags
A bitwise combination of the System.Windows.Forms.TextFormatFlags values.

Returns

A System.Drawing.Rectangle that contains the area required to fit the rendered text.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System.Windows.Forms.VisualStyles
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0