Vs2005 becomes definitely unworkable if the number of components on the
form is greater then 100. I wonder if Microsoft published this limitation.
Below is a simple class, which illustrates my words. Just add it to any
winforms app, drag drop vs2005worker from the Toolbox and Resize. You will
see increased number at the left top Conner of that component. It is a
number of controls. When this number is greater then 100 vs2005 slows down.
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Text;
using System.Drawing;
using System.Component.Design;
namespace WindowsApplication4 {
class vs2005worker : Control {
protected override void OnResize(EventArgs e) {
if(Site != null) {
IDesignerHost dh = (IDesignerHost)Site.GetService(typeof(IDesignerHost));
if(dh != null) {
vs2005worker worker = new vs2005worker();
worker.AllowDrop = false;
worker.Bounds = new Rectangle(1, 2, 3, 4);
worker.Parent = this;
dh.Container.Add(worker);
}
}
base.OnResize(e);
}
protected override void OnPaint(PaintEventArgs e) {
base.OnPaint(e);
e.Graphics.DrawString(Controls.Count.ToString(), DefaultFont, new
SolidBrush(Color.Black), new Point(0, 0));
}
}
}
Roman - 14 Jul 2006 14:37 GMT
Hi Linda Liu,
How is it going with the problem described? Is it by design or may be I
missed anything?

Signature
Thanks Roman
--
> Vs2005 becomes definitely unworkable if the number of components on the
> form is greater then 100. I wonder if Microsoft published this limitation.
[quoted text clipped - 58 lines]
>
> }