som*_*omu 3 vb.net word-wrap winforms
如何在Visual Basic .NET 2005中使用DrawString创建自动换行效果?
http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=286
您可以通过将RectangleF对象传递给DrawString方法来绘制矩形中的文本.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)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2352 次 |
| 最近记录: |