title: Drawing in Windows.Forms
body: <p>I've got a simple <code>Windows.Forms</code> Form.</p>
  
  <p>I want to fill the <code>pictureBox1</code> with color Color.Aqua and draw a rectangle.</p>
  
  <p>However nothing is drown untill I move the Form.</p>
  
  <p>Why is this?</p>
  
  <p>How can I force everything to be drawn without moving the Form?</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Drawing;
  using System.Windows.Forms;
  
  namespace WindowsFormsApplication1
  {
      public partial class Form1 : Form
      {
          private readonly Graphics _graphics;
          private List&lt;PointF&gt; _points;
          private Bitmap _bitmap;
  
          public Form1()
          {
              InitializeComponent();
              _bitmap = new Bitmap(1000, 600);
              _graphics = Graphics.FromImage(_bitmap);
              pictureBox1.Image = _bitmap;
  
              var timer = new Timer
              {
                  Interval = 1
              };
              timer.Tick += OnTick;
              timer.Start();
              Invalidate();
          }
  
          private void OnTick(object sender, EventArgs e)
          {
              _graphics.Clear(Color.Aqua);
             _graphics.DrawRectangle(Pens.Black, 10, 10, 10, 10);
              Invalidate();
          }
      }
  }
  </code></pre>