u runtimeu kreiram nekakve labele na način
Private lbl(0) As Windows.Forms.Label
Private Sub NewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewToolStripMenuItem.Click
ReDim Preserve lbl(UBound(lbl) + 1)
If lbl(UBound(lbl)) Is Nothing Then lbl(UBound(lbl)) = New Windows.Forms.Label
lbl(UBound(lbl)).BackColor = Color.Aqua
lbl(UBound(lbl)).Left = MousePosition.X
lbl(UBound(lbl)).Top = MousePosition.Y
lbl(UBound(lbl)).Parent = Me
lbl(UBound(lbl)).Show()
End Sub
Problem je što te labele nemaju evente (trebam mouse down, mouse up)
ako u prvu deklaraciju dodam withevents, dobim kratko i jasno 'WithEvents variables cannot be typed as arrays'
Ima li netko riješenje ili definitivno ne?
(vb.net)