title: Moving button programmatically
body: <p>i have a problem moving a button in C#. I have thinking so many times. And i haven't figured out what is the problem with my code. If you guys can find out where are my mistakes, please help me. Thank you so much before.</p>
  
  <p>here is my method that supposed to move a button when arrow keys is pressed.</p>
  
  <pre><code>private void Form1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
  {
      if (e.KeyValue == 39)
      {
          button1.Location = new Point(button1.Location.X + 1, button1.Location.Y);
      }
      else if (e.KeyValue == 37)
      {
          button1.Location = new Point(button1.Location.X - 1, button1.Location.Y);
      }
  }
  </code></pre>