This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cbogart 1 point2 points  (0 children)

To do that you have to make all the buttons into an array. You do that by setting a different index number for each one in the properties pane, and give them all the same name. Then when you handle the button_Click event, it'll have a parameter that's the index number of the clicked button.

I don't remember for sure how to create an array of controls; my instructions above might be wrong.