I want to use MouseEnter and MouseLeave events for Labels in a form as collectively.I have below but How I call event in For Next loop?
For Each ctl As Control In Me.Controls
If (ctl.Name.StartsWith("Label")) AndAlso (TypeOf ctl Is Label) Then
Dim lbl As Label = DirectCast(ctl, Label)
End If
Next ctl
No comments:
Post a Comment