title: How to handle multiple click events with same Sub
body: <p>I'm making a game for my visual basic course. I have multiple picture boxes that when clicked will reveal a hidden image individually. The point of the game is to find the matching pictures (simple enough).</p>
  
  <p>On the easiest level, I have 16 picture boxes. The number of picture boxes increases as the difficulty increases.</p>
  
  <p>For each picture box, I currently have an event handler as follows (default created by visual studio): </p>
  
  <pre><code>Private Sub pictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pictureBox1.Click
  </code></pre>
  
  <p>Inside, I plan to use this to change the image in the picture box, as follows:</p>
  
  <pre><code>pictureBox1.Image = (My.Resources.picture_name)
  </code></pre>
  
  <p>I would like to know if there is a way to have one Sub handle ALL the button clicks, and change the appropriate picture box, instead of having 16 separate handlers. For example:</p>
  
  <pre><code>Private Sub pictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
       Handles pictureBox1.Click, pictureBox2.Click, pictureBox3.Click, ... pictureBox16.Click
  </code></pre>
  
  <p>And do the following: </p>
  
  <pre><code>' Change appropriate picture box
  </code></pre>
  
  <p>Here's what it looks like (for now):<br>
  <img src="https://i.stack.imgur.com/a3zKF.png" alt="enter image description here"></p>