Graphics.DrawString Method (String, Font, Brush, RectangleF)
Assembly: System.Drawing (in System.Drawing.dll)
member DrawString : s:string * font:Font * brush:Brush * layoutRectangle:RectangleF -> unit
String to draw.
The text represented by the s parameter is drawn inside the rectangle represented by the layoutRectangle parameter. If the text does not fit inside the rectangle, it is truncated at the nearest word. To further manipulate how the string is drawn inside the rectangle use the DrawString overload that takes a StringFormat.
Creates a text string to draw.
Defines the font as Arial (16pt).
Creates a solid, black brush to draw with.
Creates a rectangle in which to draw the text.
Draws the rectangle to the screen.
Draws the string to the screen using the font, brush, and destination rectangle.
Available since 1.1