我有几个标签都是这样编码的:
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
然后,稍后在我的程序中,我有一个 Sub 需要对放入 current_label_clicked 的任何标签执行点击并在其上引发点击事件。就像是
Private Sub whatever()
current_label_clicked.performClick()
End Sub
但你不能用标签做到这一点。
那么如何引发标签的点击事件呢?
谢谢。