本文整理汇总了VB.NET中System.Windows.Forms.TextRenderer.DrawText方法的典型用法代码示例。如果您正苦于以下问题:VB.NET TextRenderer.DrawText方法的具体用法?VB.NET TextRenderer.DrawText怎么用?VB.NET TextRenderer.DrawText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.TextRenderer
的用法示例。
在下文中一共展示了TextRenderer.DrawText方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Point
Private Sub RenderText1(ByVal e As PaintEventArgs)
TextRenderer.DrawText(e.Graphics, "Regular Text", _
Me.Font, New Point(10, 10), SystemColors.ControlText)
End Sub
示例2: Rectangle
Private Sub RenderText2(ByVal e As PaintEventArgs)
TextRenderer.DrawText(e.Graphics, "Regular Text", _
Me.Font, New Rectangle(10, 10, 100, 100), _
SystemColors.ControlText)
End Sub
示例3: Point
Private Sub RenderText3(ByVal e As PaintEventArgs)
TextRenderer.DrawText(e.Graphics, "Regular Text", Me.Font, _
New Point(10, 10), Color.Red, Color.PowderBlue)
End Sub
示例4: Point
Private Sub RenderText5(ByVal e As PaintEventArgs)
TextRenderer.DrawText(e.Graphics, "Some text.", _
Me.Font, New Point(10, 10), SystemColors.ControlText, _
TextFormatFlags.Bottom)
End Sub
示例5: Rectangle
Private Sub RenderText4(ByVal e As PaintEventArgs)
TextRenderer.DrawText(e.Graphics, "Regular Text.", _
Me.Font, New Rectangle(10, 10, 70, 70), _
SystemColors.ControlText, SystemColors.ControlDark)
End Sub
示例6: Rectangle
Private Sub RenderText6(ByVal e As PaintEventArgs)
Dim flags As TextFormatFlags = TextFormatFlags.Bottom Or _
TextFormatFlags.EndEllipsis
TextRenderer.DrawText(e.Graphics, _
"This is some text that will be clipped at the end.", _
Me.Font, New Rectangle(10, 10, 100, 50), SystemColors.ControlText, flags)
End Sub
示例7: Point
Private Sub RenderText7(ByVal e As PaintEventArgs)
TextRenderer.DrawText(e.Graphics, "This is some text.", _
Me.Font, New Point(10, 10), Color.White, Color.SteelBlue, _
TextFormatFlags.Default)
End Sub
示例8: Rectangle
Private Sub RenderText8(ByVal e As PaintEventArgs)
Dim flags As TextFormatFlags = _
TextFormatFlags.Bottom Or TextFormatFlags.WordBreak
TextRenderer.DrawText(e.Graphics, _
"This is some text that will display on multiple lines.", _
Me.Font, New Rectangle(10, 10, 100, 50), _
SystemColors.ControlText, SystemColors.ControlDark, flags)
End Sub