本文整理匯總了VB.NET中System.Drawing.Font.Font構造函數的典型用法代碼示例。如果您正苦於以下問題:VB.NET Font構造函數的具體用法?VB.NET Font怎麽用?VB.NET Font使用的例子?那麽, 這裏精選的構造函數代碼示例或許可以為您提供幫助。您也可以進一步了解該構造函數所在類System.Drawing.Font
的用法示例。
在下文中一共展示了Font構造函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: If
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
If (Color.op_Inequality(Me.BackColor, SystemColors.ControlDark)) Then
Me.BackColor = SystemColors.ControlDark
End If
If Not (Me.Font.Bold) Then
Me.Font = New Font(Me.Font, FontStyle.Bold)
End If
End Sub
示例2: Font
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
Button2.Font = New Font(FontFamily.GenericMonospace, 12.0F, _
FontStyle.Italic, GraphicsUnit.Pixel)
End Sub
示例3: Font
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
If Not Button1.Font.Style = FontStyle.Bold Then
Button1.Font = New Font(FontFamily.GenericSansSerif, _
12.0F, FontStyle.Bold)
End If
End Sub
示例4: ConstructFontWithString
Private Sub ConstructFontWithString(ByVal e As PaintEventArgs)
Dim font1 As New Font("Arial", 20)
e.Graphics.DrawString("Arial Font", font1, Brushes.Red, New PointF(10, 10))
End Sub