Multiple Control Click Events handled by one event
问题 I am creating a basic winform application that has many pictureboxes with click events. The click events need to use the name of the picturebox that was clicked in order to execute the rest of the code. I do not want to create unique click events for all of the pictureboxes. I was hoping there would be a simple way to get this information, like using the "sender" parameter or the event arguments. 回答1: You add one click event handler for all of the PictureBoxes: pic1.Click += PictureBoxClick;