The following procedure has worked before, but won't work at all:
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim Labels() As Label = New Label() {Label1, Label2, Label3}
end sub
Private Sub Labels_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Label1.Click, Label2.Click, label3.Click
for i = 0 to 2
Labels(i).BackgroundImage = My.Resources.buttonBselected 'NOT WORKING!!!
next
end sub
It turns "NullReferenceException" message. How can I declare the labels array global or etc? (VS 2010)