D
davide
In my application I use a large number of panels and textboxes. If I
set the backcolor to each control, the application requires a large
number of GDI objects. They are not freed until Dispose() get called.
for (int i = 0; i<1000; i++)
{
t = new TextBox();
// if I comment this statement, the problem does not occur
t.BackColor = Color.Red;
Controls.Add(t);
}
How can I limit the GDI object usage while the controls are shown (so I
can't dispose them)?
Thanks
Davide
set the backcolor to each control, the application requires a large
number of GDI objects. They are not freed until Dispose() get called.
for (int i = 0; i<1000; i++)
{
t = new TextBox();
// if I comment this statement, the problem does not occur
t.BackColor = Color.Red;
Controls.Add(t);
}
How can I limit the GDI object usage while the controls are shown (so I
can't dispose them)?
Thanks
Davide