Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) _
Handles MyBase.Paint
Dim brushBackDiag As New HatchBrush(HatchStyle.BackwardDiagonal, Color.FromArgb(0, 0, 255))
Dim brushCross As New HatchBrush(HatchStyle.Cross, Color.FromArgb(200, 0, 0))
Dim brushDarkDown As New HatchBrush(HatchStyle.DarkDownwardDiagonal, Color.Salmon)
Dim brushDarkHorz As New HatchBrush(HatchStyle.DarkHorizontal, Color.Navy)
Dim brushDarkUpDiag As New HatchBrush(HatchStyle.DarkUpwardDiagonal, Color.Pink)
Dim brushVertical As New HatchBrush(HatchStyle.DarkVertical, Color.FromArgb(255, 0, 255))
Dim brushDashDnDiag As New HatchBrush(HatchStyle.DashedDownwardDiagonal, _
Color.FromArgb(255, 128, 0))
Dim brushDashHorz As New HatchBrush(HatchStyle.DashedHorizontal, Color.FromArgb(0, 128, 192))
Dim brushDashUpDiag As New HatchBrush(HatchStyle.DashedUpwardDiagonal, Color.Green)
Dim brushDashVert As New HatchBrush(HatchStyle.DashedVertical, Color.Firebrick)
Dim brushDiagBrisk As New HatchBrush(HatchStyle.DiagonalBrick, Color.Fuchsia)
Dim brushDiagCross As New HatchBrush(HatchStyle.DiagonalCross, Color.Moccasin)
Dim brushDivot As New HatchBrush(HatchStyle.Divot, Color.Goldenrod)
Dim brushDotDiamond As New HatchBrush(HatchStyle.DottedDiamond, Color.Gainsboro)
Dim brushDottedGrid As New HatchBrush(HatchStyle.DottedGrid, Color.Khaki)
Dim brushForDiag As New HatchBrush(HatchStyle.ForwardDiagonal, Color.Maroon)
Dim brushHorz As New HatchBrush(HatchStyle.Horizontal, Color.Red)
Dim brushHorzBrick As New HatchBrush(HatchStyle.HorizontalBrick, Color.SaddleBrown)
Dim brushLgChkBoard As New HatchBrush(HatchStyle.LargeCheckerBoard, Color.RoyalBlue)
Dim brushLgConfetti As New HatchBrush(HatchStyle.LargeConfetti, Color.MistyRose)
Dim brushLgGrid As New HatchBrush(HatchStyle.LargeGrid, Color.Purple)
Dim brushLtDnDiag As New HatchBrush(HatchStyle.LightDownwardDiagonal, Color.DarkCyan)
Dim brushLtHorz As New HatchBrush(HatchStyle.LightHorizontal, Color.PowderBlue)
Dim brushUpDiag As New HatchBrush(HatchStyle.LightUpwardDiagonal, Color.SeaGreen)
Dim brushLtVert As New HatchBrush(HatchStyle.LightVertical, Color.Olive)
e.Graphics.FillRectangle(brushBackDiag, 20, 20, 80, 60)
e.Graphics.FillRectangle(brushCross, 120, 20, 80, 60)
e.Graphics.FillRectangle(brushDarkDown, 220, 20, 80, 60)
e.Graphics.FillRectangle(brushDarkHorz, 320, 20, 80, 60)
e.Graphics.FillRectangle(brushDarkUpDiag, 420, 20, 80, 60)
e.Graphics.FillRectangle(brushVertical, 20, 100, 80, 60)
e.Graphics.FillRectangle(brushDashDnDiag, 120, 100, 80, 60)
e.Graphics.FillRectangle(brushDashHorz, 220, 100, 80, 60)
e.Graphics.FillRectangle(brushDashUpDiag, 320, 100, 80, 60)
e.Graphics.FillRectangle(brushDashVert, 420, 100, 80, 60)
e.Graphics.FillRectangle(brushDashVert, 20, 180, 80, 60)
e.Graphics.FillRectangle(brushDiagBrisk, 120, 180, 80, 60)
e.Graphics.FillRectangle(brushDiagCross, 220, 180, 80, 60)
e.Graphics.FillRectangle(brushDivot, 320, 180, 80, 60)
e.Graphics.FillRectangle(brushDotDiamond, 420, 180, 80, 60)
e.Graphics.FillRectangle(brushDottedGrid, 20, 260, 80, 60)
e.Graphics.FillRectangle(brushForDiag, 120, 260, 80, 60)
e.Graphics.FillRectangle(brushHorz, 220, 260, 80, 60)
e.Graphics.FillRectangle(brushHorzBrick, 320, 260, 80, 60)
e.Graphics.FillRectangle(brushLgChkBoard, 420, 260, 80, 60)
e.Graphics.FillRectangle(brushLgGrid, 20, 340, 80, 60)
e.Graphics.FillRectangle(brushLtDnDiag, 120, 340, 80, 60)
e.Graphics.FillRectangle(brushLtHorz, 220, 340, 80, 60)
e.Graphics.FillRectangle(brushUpDiag, 320, 340, 80, 60)
e.Graphics.FillRectangle(brushLtVert, 420, 340, 80, 60)
End Sub
|