New Font(String name, Int size,FontStyle textStyle)
Imports System.Drawing Imports System.Drawing.Drawing2D Imports System.Windows.Forms public class FontStyleCreate 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 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