title: Slow adding of controls to a form
body: <p>Why does the paint even take so long?</p>
  
  <pre><code>public Form1()
      {
          InitializeComponent();
          SuspendLayout();
          double scale = ClientSize.Width / 11;
          for (int i = 1; i &lt; 10; i++)
          {
              for (int j = 1; j &lt; 10; j++)
              {
                  everybox[i - 1, j - 1] = new TextBox
                                               {
                                                   Location = new Point((int)(scale * i), (int)(scale * j)),
                                                   Size = new Size((int)scale - 2, (int)scale - 2),
                                                   Multiline = true
                                               };
                  Controls.Add(everybox[i - 1, j - 1]);
              }
          }
          ResumeLayout();
      }
  
  
  private void Form1_Paint(object sender, PaintEventArgs e)
      {
          float scale = ClientSize.Width / 11;
          Graphics g = this.CreateGraphics();
          int counter = 0;
          for (float i = scale; i &lt;= this.ClientSize.Width - scale; i += scale)
          {
              counter++;
              if ((counter - 1) % 3 != 0)
              {
                  g.DrawLine(new Pen(Color.Black), new Point((int)i, (int)scale),
                             new Point((int)i, ClientSize.Width - (int)scale));
                  g.DrawLine(new Pen(Color.Black), new Point((int)scale, (int)i),
                             new Point(ClientSize.Width - (int)scale, (int)i));
              }
              else
              {
                  g.DrawLine(new Pen(Color.Black, 3f), new Point((int)i, (int)scale),
                             new Point((int)i, ClientSize.Width - (int)scale));
                  g.DrawLine(new Pen(Color.Black, 3f), new Point((int)scale, (int)i),
                             new Point(ClientSize.Width - (int)scale, (int)i));
              }
          }
      }
  </code></pre>
  
  <p>It is rather annoying, and causes noticeable lag. everybox is a TextBox[9,9] object.</p>