3
如何使用DrawString在Visual Basic .NET 2005中創建自動換行效果?Windows窗體中的自動換行(vb.net)
如何使用DrawString在Visual Basic .NET 2005中創建自動換行效果?Windows窗體中的自動換行(vb.net)
http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=286
您可以通過傳遞的RectangleF對象拉繩方法繪製一個矩形文本。 GDI +將包裝文本以使其適合指定的矩形。例如:
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)
如果你提供一個矩形的Graphics.DrawString方法的重載,它會包裹在矩形內的文本。
Overloads Public Sub DrawString(String, Font, Brush, RectangleF)