title: Moving Object with Paint Event
body: <p>I have a test tomorrow, and we <b>must</b> use the paint event to redraw our objects, we may not use a timer.</p>
  
  <p>As the MSDN says: <em>"The Paint event is raised when the control is redrawn."</em>, but that,occurs for my known, only when the form is minimized, or got invisible and back visible.</p>
  
  <p>My code:</p>
  
  <blockquote>
  <pre><code>public partial class Form1 : Form
  {
      public Graphics drawArea;
      public int xPos, yPos;
  
      public Form1()
      {
          InitializeComponent();
      }
      private void Form1_Paint(object sender, PaintEventArgs e)
      {
          drawArea = e.Graphics;
          DrawUser();
      }
  
      private void Form1_KeyDown(object sender, KeyEventArgs e)
      {
          switch (e.KeyCode)
          { 
              case Keys.Down:
                  yPos++;
                  break;
              case Keys.Up:
                  yPos--;
                  break;
              case Keys.Left:
                  xPos--;
                  break;
              case Keys.Right:
                  xPos++;
                  break;
          }
      }
  
      private void DrawUser()
      {
          drawArea.FillRectangle(new SolidBrush(Color.Red), xPos, yPos, 50, 50);
      }
  }
  </code></pre>
  </blockquote>
  
  <p>So, When I press the key arrows multiple times, the object only moves after I re-size my form. I want it to move instantly, only using the paint event.</p>
  
  <p>Thanks</p>