Hi Matteo,
it's me again - I think, this solution will match to your problem ... ;)
I would do the following :
Catch the nescessary Events inside your class and rebuild them inside the class with the class itself as sender.
Public Class clsTraini
Public ButtTrain As CheckBox
Public lblTrain As Label
Public PictTrain As PictureBox
Public Sub New()
AddHandler ButtTrain.CheckStateChanged, AddressOf CheckBox_Checked
End Sub
Public Sub Dispose()
RemoveHandler ButtTrain.CheckStateChanged, AddressOf CheckBox_Checked
End Sub
Private Sub CheckBox_Checked(sender As Object, e As EventArgs)
RaiseEvent CheckedStateChanged(Me, e)
End Sub
Public Event CheckedStateChanged(sender As Object, e As EventArgs)
End Class
and inside your form this :
Public Class Form1
Public RegVel() As clsTraini
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
ReDim RegVel(2)
For I = 1 To RegVel.GetUpperBound(0)
RegVel(I) = New clsTraini
RegVel(I).ButtTrain = New CheckBox
With RegVel(I).ButtTrain
.Tag = 6
.Height = 45
.Width = 45
End With
AddHandler RegVel(I).CheckedChanged, AddressOf ForzaTraino
Next
End Sub
I hope that I could help you ...
Edit:
Naturally you have to create all nescessary settings inside the constructor of this class ... (and not longer with the form-script)