title: Collision detection between 2 picture boxes
body: <p>I am developing a game and am trying to accomplish collision detection for 2 picture boxes. I have a timer control that is responsible for moving a spike (enemy) towards a box (my character). </p>
  
  <p>Here is my code:</p>
  
  <pre><code>private void tmrSpike_Tick(object sender, EventArgs e)
          {
              // Spike moving left interval
              spike1.Left -= 6;
  
              if (picSquare.ClientRectangle.IntersectsWith(spike1.ClientRectangle))
                  MessageBox.Show("sd");
  
  
              if (spike1.Left + spike1.Width &lt; 0)
                  spike1.Left = ActiveForm.Width;
  
          }
  </code></pre>
  
  <p><strong>PicturesBoxes:</strong><br />
  spike1<br />
  picSquare</p>
  
  <p>How do I make it so when the box (character) hits the spike (enemy), it shows an alert?</p>
  
  <p>Note: Only the spike is moving towards the box. The box only jumps up and drops down when the up key is pressed. My game concept is VERY similar to this: <a href="http://www.flukedude.com/theimpossiblegame/" rel="nofollow">http://www.flukedude.com/theimpossiblegame/</a></p>