title: Closing a VB.NET form when Escape key is pressed
body: <p>I'm using VB 2010 Express.</p>
  
  <p>In <code>C#</code> I would set the forms <code>CancelButton</code> property.</p>
  
  <p>For this VB form I don't have a CancelButton so I suspect I need to program either <code>KeyPress</code> or <code>KeyDown</code>.  </p>
  
  <ol>
  <li>What is the difference between these two events?  </li>
  <li>Which should I use? </li>
  <li><p>I assume the general code for this is as follows?:</p>
  
  <pre><code>If e.KeyCode = Keys.Escape Then
      Close()
  End If
  </code></pre></li>
  </ol>
  
  <p>I have certain <code>.Focus</code> code within other controls of the form then it becomes pointless putting this in the main forms event procedure as the main form never really <em>has</em> the focus.</p>