System.Windows.Forms 2.0.0.0 System.Object The class provides a set of static methods that can be used for measuring and drawing text on a Windows Form control. You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . The methods of are not supported for printing. You should always use the methods of the class. Provides methods used to measure and render text. This class cannot be inherited. Method 2.0.0.0 System.Void You can manipulate how the text is drawn by using one of the overloads that takes a parameter. If is null or is , the method will draw the text in the font or color currently selected in the device context specified by . If is , the text will not be drawn. The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. The methods that specify a as the upper-left corner of the drawn text do not render correctly on Windows 2000. If your application is intended for use on machines running Windows 2000, you should use one of the methods that specify a for the bounds of the drawn text. Draws the specified text at the specified location using the specified device context, font, and color. The device context in which to draw the text. The text to draw. The to apply to the drawn text. The that represents the upper-left corner of the drawn text. The to apply to the drawn text. Method 2.0.0.0 System.Void If or is null or , respectively; the method will draw the text in the font or color currently selected in the device context specified by . If is , the text will not be drawn. This method will result in text that is horizontally and vertically centered in the rectangle specified by the parameter. To change how the text is drawn, use a version of that takes a parameter type. The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. Draws the specified text within the specified bounds, using the specified device context, font, and color. The device context in which to draw the text. The text to draw. The to apply to the drawn text. The that represents the bounds of the text. The to apply to the drawn text. Method 2.0.0.0 System.Void The parameter is applied to the rectangular area containing the drawn text. If , or is null or , respectively; the method will draw the text in the font or color currently selected in the device context specified by . If is , the text will not be drawn. You can manipulate how the text is drawn by using one of the overloads that takes a parameter. The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. The methods that specify a as the upper-left corner of the drawn text do not render correctly on Windows 2000. If your application is intended for use on machines running Windows 2000, you should use one of the methods that specify a for the bounds of the drawn text. Draws the specified text at the specified location, using the specified device context, font, color, and back color. The device context in which to draw the text. The text to draw. The to apply to the drawn text. The that represents the upper-left corner of the drawn text. The to apply to the drawn text. The to apply to the background area of the drawn text. Method System.Void You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . The parameter is applied to the area within the parameter. If or is null or , respectively; the method will draw the text in the font or color currently selected in the device context specified by . If is , the text will not be drawn. The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. The methods that specify a as the upper-left corner of the drawn text do not render correctly on Windows 2000. If your application is intended for use on machines running Windows 2000, you should use one of the methods that specify a for the bounds of the drawn text. Draws the specified text at the specified location using the specified device context, font, color, and formatting instructions. The device context in which to draw the text. The text to draw. The to apply to the drawn text. The that represents the upper-left corner of the drawn text. The to apply to the drawn text. A bitwise combination of the values. 2.0.0.0 Method 2.0.0.0 System.Void The parameter is applied to the area within the parameter. If , or is null or , respectively; the method will draw the text in the font or color currently selected in the device context specified by . If is , the text will not be drawn. This method will result in text that is horizontally and vertically centered in the rectangle specified by the parameter. To change how the text is drawn, use a version of that takes a parameter type. The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. Draws the specified text within the specified bounds using the specified device context, font, color, and back color. The device context in which to draw the text. The text to draw. The to apply to the drawn text. The that represents the bounds of the text. The to apply to the drawn text. The to apply to the area represented by . Method System.Void If or is null or , respectively; the method will draw the text in the font or color currently selected in the device context specified by . If is , the text will not be drawn. You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. Draws the specified text within the specified bounds using the specified device context, font, color, and formatting instructions. The device context in which to draw the text. The text to draw. The to apply to the drawn text. The that represents the bounds of the text. The to apply to the drawn text. A bitwise combination of the values. 2.0.0.0 Method 2.0.0.0 System.Void The parameter is applied the rectangular area containing the drawn text. If or is null or , respectively; the method will draw the text in the font or color currently selected in the device context specified by . If is , the text will not be drawn. You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. The methods that specify a as the upper-left corner of the drawn text do not render correctly on Windows 2000. If your application is intended for use on machines running Windows 2000, you should use one of the methods that specify a for the bounds of the drawn text. Draws the specified text at the specified location using the specified device context, font, color, back color, and formatting instructions The device context in which to draw the text. The text to draw. The to apply to the drawn text. The that represents the upper-left corner of the drawn text. The to apply to the text. The to apply to the background area of the drawn text. A bitwise combination of the values. Method 2.0.0.0 System.Void The parameter is applied to the area within the parameterIf , or is null or , respectively; the method will draw the text in the font or color currently selected in the device context specified by . If is , the text will not be drawn. You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions. The device context in which to draw the text. The text to draw. The to apply to the drawn text. The that represents the bounds of the text. The to apply to the text. The to apply to the area represented by . A bitwise combination of the values. Method System.Drawing.Size The method requires that the text is drawn on a single line. Provides the size, in pixels, of the specified text when drawn with the specified font. The , in pixels, of drawn on a single line with the specified . You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . The text to measure. The to apply to the measured text. 2.0.0.0 Method 2.0.0.0 System.Drawing.Size The method requires that the text is drawn on a single line. Provides the size, in pixels, of the specified text drawn with the specified font in the specified device context. The , in pixels, of drawn in a single line with the specified in the specified device context. The device context in which to measure the text. The text to measure. The to apply to the measured text. Method 2.0.0.0 System.Drawing.Size The method uses the parameter to indicate the relationship of height to width when determining the text size. When measuring text on a single line, if the parameter represents a with a height dimension greater than , the returned will be adjusted to reflect the actual height of the text. 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. The , in pixels, of drawn with the specified . The text to measure. The to apply to the measured text. The of the initial bounding rectangle. Method 2.0.0.0 System.Drawing.Size The method uses the parameter to indicate the relationship of height to width when determining the text size. When measuring text on a single line, if the parameter represents a with a height dimension greater than , the returned will be adjusted to reflect the actual height of the text. 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. The , in pixels, of drawn with the specified . The device context in which to measure the text. The text to measure. The to apply to the measured text. The of the initial bounding rectangle. Method System.Drawing.Size uses the and parameters to indicate the relationship of height to width when determining the text size. When measuring text on a single line, if the parameter represents a with a height dimension greater than , the returned will be adjusted to reflect the actual height of the text. You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . This overload of will ignore a value of or . If you are specifying a padding value other than the default, you should use the overload of that takes a object. 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. The , in pixels, of drawn with the specified and format. The text to measure. The to apply to the measured text. The of the initial bounding rectangle. The formatting instructions to apply to the measured text. 2.0.0.0 Method 2.0.0.0 System.Drawing.Size The method uses the and parameters to indicate the relationship of height to width when determining the text size. When measuring text on a single line, if the parameter represents a with a height dimension greater than , the returned will be adjusted to reflect the actual height of the text. You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces, use the versions of and that take a and parameter, as shown in the example. 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. The , in pixels, of drawn with the specified and format. The device context in which to measure the text. The text to measure. The to apply to the measured text. The of the initial bounding rectangle. The formatting instructions to apply to the measured text.