'Bitmap for piece
Dim MyBitmap As New Bitmap(Me.Height, Me.Width)
'Bitmap for board and holes
Dim MyBitmap2 As New Bitmap(Me.Height, Me.Width)
'Graphics for piece
Dim MyGraphics As Graphics = Graphics.FromImage(MyBitmap)
'Graphics for holes
Dim MyGraphics2 As Graphics = Graphics.FromImage(MyBitmap2)
'Board brush
Dim MyBackBrush As New SolidBrush(Color.Yellow)
'Transparent brush
Dim MyHoleBrush As New SolidBrush(Color.Green)
'Peice Brush
Dim MyPieceBrush As New SolidBrush(Color.Red)
'Draw Piece
MyGraphics.FillEllipse(MyPieceBrush, 60, 25, 25, 25)
'Draw board and holes
MyGraphics2.FillRectangle(MyBackBrush, 0, 0, MyBitmap.Width, MyBitmap.Height)
MyGraphics2.FillEllipse(MyHoleBrush, 10, 10, 25, 25)
MyGraphics2.FillEllipse(MyHoleBrush, 60, 10, 25, 25)
MyGraphics2.FillEllipse(MyHoleBrush, 110, 10, 25, 25)
MyGraphics2.FillEllipse(MyHoleBrush, 10, 60, 25, 25)
MyGraphics2.FillEllipse(MyHoleBrush, 60, 60, 25, 25)
MyGraphics2.FillEllipse(MyHoleBrush, 110, 60, 25, 25)
'Make holes transparent
MyBitmap2.MakeTransparent(Color.Green)
'Render piece
Me.CreateGraphics.DrawImage(MyBitmap, 0, 0)
'Render board
Me.CreateGraphics.DrawImage(MyBitmap2, 0, 0)