GamePiece.vb

 Public Class CGamePiece
    Private mCurrentType As Integer
    Private mPieceImage As Bitmap
    Private mLocationRectangle As Rectangle = _
        New Rectangle(0, 0, 45, 45)
    Public Sub New( _
       ByVal xLocation As Integer, ByVal yLocation As Integer, _
       ByVal sourceImage As Bitmap)
        mLocationRectangle.X = xLocation
        mLocationRectangle.Y = yLocation
        mPieceImage = sourceImage.Clone(New Rectangle(1, _
           0, 34, 34), Drawing.Imaging.PixelFormat.DontCare)
    End Sub
    Public Sub Draw(ByVal graphicsObject As Graphics)
        graphicsObject.DrawImage(mPieceImage, mLocationRectangle)
    End Sub
    Public ReadOnly Property LocationRectangle() As Rectangle
        Get
            Return mLocationRectangle
        End Get
    End Property
    Public Sub SetLocation(ByVal xLocation As Integer, _
       ByVal yLocation As Integer)
        mLocationRectangle.X = xLocation
        mLocationRectangle.Y = yLocation
    End Sub
End Class

Project Homepage: