关于房态图的制作方法(C#)
2010-04-07 21:09
218 查看
效果图如上,代码如下
private void Form3_Load(object sender, EventArgs e)
{
for (int i = 0; i < 30; i++)
{
// Label lb = new Label();
Button lb = new Button();
lb.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
lb.Width = 80;
lb.Height = 80;
lb.Text = i.ToString("000");
lb.BackColor = Color.PowderBlue;
lb.ForeColor = Color.Red;
lb.TextAlign = ContentAlignment.TopCenter;
lb.MouseMove += new MouseEventHandler(button_MouseMove);
lb.MouseLeave += new EventHandler(button_MouseLeave);
lb.Image = Image.FromFile(@"F:/VS2008ImageLibrary/Actions/AddTableHH.bmp");
lb.ImageAlign = ContentAlignment.MiddleCenter;
for (int j = 0; j < 3; j++)
{
Label lb1 = new Label();
lb1.BackColor = Color.SlateGray;
lb1.Location = new Point(j*20+7,60);
lb1.Width = 10;
lb1.Height = 11;
lb.Controls.Add(lb1);
}
this.flowLayoutPanel1.Controls.Add(lb);
}
}
相关文章推荐
- 关于房态图的制作方法(C#)
- 关于C# winform 快速制作不规则边框的方法
- 关于unity使用dll和c#扩展方法的小结
- 【求助】寻求关于用VS.NET2003制作带有序列号验证WEB应用程序安装包的方法
- C# 关于winFrom控制网页的自动登录的问题(网页刷屏器的制作原理)
- c#基础加强版之方法控制流复习-1关于方法的讲解
- 关于c#解析JSON格式在.netframeword 3.5以下版本的原始方法
- 关于C#中方法调用的详解
- 关于C#中静态数据成员和静态方法的总结。
- 关于C#异步方法调用
- 关于c#静态方法和实例方法的辨析和应用
- 【技术】C#入门:String类的split() 方法中 关于转义字符的问题
- 关于C#连接FTP时路径问题的解决方法
- C# 透明窗体制作方法
- 关于C#中Timer定时器的重入问题解决方法(也适用于多线程)
- C# 关于out关键字的用法(一个方法返回多个值的问题)
- 关于制作rpm包的patch的方法
- c# 关于基类和子类的方法调用问题--总结
- 关于C#中this的一个用法----用于C#原始类型扩展方法
- 关于在 C#中无法静态库引用的解决方法