Imports System.Drawing.Drawing2D Public Class Form1 ' Draw a hatched rectangle. Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Using br As New HatchBrush(HatchStyle.DiagonalBrick, Color.Red, Color.Pink) e.Graphics.FillRectangle(br, 10, 10, 200, 150) e.Graphics.DrawRectangle(Pens.Red, 10, 10, 200, 150) End Using End Sub End Class |