Public Class Texture Inherits PictureBox Dim r, c As Integer Dim t As String Dim o As Boolean Public Sub New(ByVal ro As Integer, ByVal co As Integer) Me.row = ro Me.column = co Me.Size = New Size(32, 32) Me.SizeMode = PictureBoxSizeMode.StretchImage Me.Location = New Point(row * 32, column * 32) Me.Image = Image.FromFile("grass.jpg") Me.type = "g" Me.BringToFront() End Sub Public Property row As Integer Get Return r End Get Set(ByVal value As Integer) r = value End Set End Property Public Property occupied As Boolean Get Return o End Get Set(ByVal value As Boolean) o = value End Set End Property Public Property column As Integer Get Return c End Get Set(ByVal value As Integer) c = value End Set End Property Public Property type As String Get Return t End Get Set(ByVal value As String) t = value End Set End Property Public Sub drawTexture() If Me.type = "g" Then Me.Image = Image.FromFile("grass.jpg") ElseIf Me.type = "p" Then Me.Image = Image.FromFile("path.jpg") End If End Sub End Class