~~~~~~~~~~~~~~~~~~~~~~~~~
Public Class PictureBoxClass
Inherits PictureBox
' used as a ID within the array
Private I As Integer
' flips the control color
Private F As Boolean
Public Event PicBoxClick(ByVal ID)
Public Property ID() As Integer
Get
Return I
End Get
Set(ByVal Value As Integer)
I = Value
End Set
End Property
Public Property FaceUp() As Boolean
Get
Return F
End Get
Set(ByVal Value As Boolean)
F = Value
End Set
End Property
' To make "Click" and "DoubleClick" act the same way
Public Sub Picturebox_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Click, _
MyBase.DoubleClick
RaiseEvent PicBoxClick(ID)
End Sub
End Class
~~~~~~~~~~~~~~~~~~~~~~~~~

