Public Class Frm_DisplayGubun Dim Fc As Color = Color.Black Dim Bc As Color = Color.White Public Sub New() ' 이 호출은 Windows Form 디자이너에 필요합니다. InitializeComponent() ' InitializeComponent() 호출 뒤에 초기화 코드를 추가하십시오. End Sub Public Sub New(ByVal vfc As String, ByVal vfb As String) InitializeComponent() Try Me.Fc = Color.FromArgb(vfc) Catch ex As Exception Me.Fc = Color.Black End Try Try Me.Bc = Color.FromArgb(vfb) Catch ex As Exception Me.Bc = Color.White End Try End Sub Private Sub Frm_DisplayGubun_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Width = 555 Me.Height = 362 End Sub Private Sub Frm_DisplayGubun_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Dim x, y As Decimal x = 0 y = 0 Dim G As Graphics = e.Graphics For i As Integer = 0 To 100 If i <> 0 AndAlso i Mod 10 = 0 Then x = 0 y += 55 ElseIf i <> 0 Then x += 55 End If Try Dim B As New System.Drawing.Drawing2D.HatchBrush(i, Me.Fc, Me.Bc) G.FillRectangle(B, New Rectangle(x, y, 50, 50)) G.DrawString(i.ToString, Me.Font, New SolidBrush(Color.White), x, y) Catch ex As Exception End Try Next G.Dispose() End Sub End Class