- 博客(0)
- 资源 (1)
空空如也
C#动态添加控件源代码
在C#下,动态添加控件源代码,pic
name = "image_" + i.ToString();
PictureBox pb = new PictureBox();
pb.Name = name;
pb.Image = (Image)Properties.Resources.ResourceManager.GetObject(sImage);
pb.Tag = "test";
this.Controls.Add(pb);
pb.Width=23;
pb.Height =23;
int x = Convert.ToInt32( 80 + 27.85 * (i % 27));
int y=Convert.ToInt32(33 + 28 * (i / 27));
pb.Location = new System.Drawing.Point(x,y);
2008-12-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人