title: How to begin draw in one event and continue in another?
body: <p>I am using Visual Studio 2013 to write a Windows Forms C# application. I want to draw game board on <code>Form1_Load</code> and draw pawns on button click. I have written two methods: <code>InitDraw()</code> and <code>Draw()</code>. When both method are in <code>Form1_Load()</code> or <code>button1_Click()</code> it's OK, but if <code>InitDraw()</code> is in <code>Form1_Load()</code> and <code>Draw()</code> is in <code>button1_Click()</code> - it draws only if I press Alt or move windows out of screen and move back to screen. I added <code>Invalidate()</code> but this does not help.</p>
  
  <pre><code>using System;
  using System.Drawing;
  using System.Windows.Forms;
  
  namespace WindowsFormsApplication1
  {
      public partial class Form1 : Form
      {
          Bitmap drawBitmap;
          public Form1()
          {
              InitializeComponent();
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
              InitDraw();
          }
  
          private void button1_Click(object sender, EventArgs e)
          {
              Draw();
          }
  
          private void InitDraw()
          {
              drawBitmap = new Bitmap(500, 500);
              pictureBox1.Image = drawBitmap;
          }
  
          private void Draw()
          {
              Graphics g = Graphics.FromImage(pictureBox1.Image);
              Pen myPen = new Pen(Color.Black);
              g.DrawLine(myPen, 0, 0, 100, 100);
              myPen.Dispose();
              g.Dispose();
              Invalidate();
          }
      }
  }
  </code></pre>