hai how to do word wrap in drawstring in vb.net 2005. please tell me
+2
A:
http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=286
You can draw text in a rectangle by passing a RectangleF object to the DrawString method. GDI+ will wrap the text to make it fit in the specified rectangle. For example:
Dim s As String = "This string will be wrapped in the output rectangle"
Dim rectf As New RectangleF(10, 100, 200, 200)
grf.DrawString(s, myFont, Brushes.Red, rectf)
Sören Kuklau
2009-04-25 06:21:20
+1
A:
If you provide a rectangle to an overload of the Graphics.DrawString method, it will wrap the text within the rectangle.
Overloads Public Sub DrawString(String, Font, Brush, RectangleF)
Indolent Code Monkey
2009-04-25 06:26:12
A:
just wanted to say thanks to Soren. Used this on a printout, didn't want the rectangle on the printout so just made the border white and wah lah. Thanks dude.
mike
2009-07-02 20:58:58