I have putted 36 Labels on Form, unfortunately it dosen't display properly I can see how those labels are drawn. I'm using Double Buffere. Here is a code that shows my problem:
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace Testowa
{
class Form1:Form
{
public Form1()
{// here I turn on Double Buffering
this.DoubleBuffered = true;
// here I make Labels
int x = 0, y;
for ( x=0 ; x<6 ; x++ )
for (y = 0; y < 6; y++)
{
Label l = new Label();
l.Top = 40 * y;
l.Left = 40 * x;
l.Width = 40;
l.Height = 40;
l.Text = String.Format("({0} ; {1})", x, y);
l.Visible = true;
this.Controls.Add(l);
}
}
static void Main(string[] args)
{
Application.Run(new Form1());
}
}
}
I would like to gek know how to improve it.