本文整理匯總了VB.NET中System.Drawing.Font.GetHeight方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET Font.GetHeight方法的具體用法?VB.NET Font.GetHeight怎麽用?VB.NET Font.GetHeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Drawing.Font
的用法示例。
在下文中一共展示了Font.GetHeight方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: Font
Public Sub GetHeight_Example(ByVal e As PaintEventArgs)
' Create a Font object.
Dim myFont As New Font("Arial", 16)
'Draw text to the screen with myFont.
e.Graphics.DrawString("This is the first line", myFont, _
Brushes.Black, New PointF(0, 0))
'Get the height of myFont.
Dim height As Single = myFont.GetHeight(e.Graphics)
'Draw text immediately below the first line of text.
e.Graphics.DrawString("This is the second line", myFont, _
Brushes.Black, New PointF(0, height))
End Sub