FontStyle.Italic : FontStyle « System.Drawing « VB.Net by API






FontStyle.Italic

  
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms

public class FontStyleBoldItalicUnderlineStrikout
   public Shared Sub Main
        Application.Run(New Form1)
   End Sub
End class

Public Class Form1
    Inherits System.Windows.Forms.Form
    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        Dim canvas As Graphics = e.Graphics
        
        Dim mainFont As Font
        Dim textStyle As New FontStyle
        textStyle = FontStyle.Regular
        textStyle = textStyle Or FontStyle.Bold
        textStyle = textStyle Or FontStyle.Italic Or FontStyle.Underline Or FontStyle.Strikeout
        mainFont = New Font("Arial", 40, textStyle)
        
        Dim brush1 As New SolidBrush(Color.DarkBlue)
        canvas.DrawString("www.java2s.com",mainFont, brush1, 120, 70)        
        
        canvas = Nothing
    End Sub
End Class

   
    
  








Related examples in the same category

1.FontStyle.Bold
2.FontStyle.Regular
3.FontStyle.Strikeout
4.FontStyle.Underline