I have a several labels all coded as such:
Public assessment_menu_button As New Label
Public current_label_clicked As New Label
AddHandler assessment_menu_button.Click, AddressOf click_assessment_menu_button
Private Sub click_assessment_menu_button(ByVal sender As System.Object,
ByVal e As System.EventArgs)
current_label_clicked = sender
' do some other stuff
End Sub
Then, later in my program, I have a Sub which needs to perform a click on whichever label was put into current_label_clicked and raise a click event on it. Something like
Private Sub whatever()
current_label_clicked.performClick()
End Sub
but you can't do that with labels.
So how do I raise the click event for the label?
Thanks.
Let's say your label is named Label1.
This Sub is the Sub that will be executed when you click on the label.
To raise a label click, you just need to call that event.
That's it :)