2,892 questions
Hi @José Carlos ,
Please check if the following code hepls.
For Each control As Control In groupBox2.Controls
AddHandler control.Click, AddressOf PictureBox_Click
Next
Private Sub PictureBox_Click(sender As Object, e As EventArgs)
Dim SelectedPictureBox As PictureBox = DirectCast(sender, PictureBox)
Select Case SelectedPictureBox.Name
Case "xxxxxxx"
Case Else
End Select
End Sub
Best Regards.
Jiachen Li
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.