Below I create an array of labels. I would like to add an click event to my labels. Can someone point me in a direction?
Thanks
Code:Public Class frmMain Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim lblQty(196) As Label Dim x As Integer = 115 Dim y As Integer = 30 For intLoopRows As Integer = 0 To 27 y += 37 For intLoopCols As Integer = 0 To 6 x += 50 lblQty(intLoopRows) = New Label lblQty(intLoopRows).Text = "0" lblQty(intLoopRows).SetBounds(x, y, 12, 12) Me.Controls.Add(lblQty(intLoopRows)) Next x = 115 Next End Sub End Class




Reply With Quote