Graphics.DrawString Method (String, Font, Brush, PointF)
.NET Framework (current version)
Draws the specified text string at the specified location with the specified Brush and Font objects.
System.Drawing (in System.Drawing.dll)
member DrawString :
point:PointF -> unit
The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. The code performs the following actions:
Creates a text string to draw.
Defines the font as Arial (16pt).
Creates a solid, black brush to draw with.
Creates a point for the upper-left corner at which to draw the text.
Draws the string to the screen using the font, brush, and destination point.
No code example is currently available or this language may not be supported.
Return to top
Available since 1.1