我得到一个3*4数 然后自动在界面上生成一个长为3,宽为4的有label组成的窗体··帮一下。
解决方案 »
- c#如何从一个内容中提取TAG关键词?
- 数字转化DataTime(C#)
- 请问c# VS2005里怎么实现FASTREPORT这样的自定义打印模板和报表。。。
- sql语句
- 关于图像合成!SOS!
- 高分100求:线程停止的问题,在线给分!!!
- C#分多次写入word
- 请问一个在C#里生成xml文档,一定要有root吗?
- 怎么实现fileupload浏览的时候,image控件出现图片,是在不上传的情况下~ 最好具体说明下
- 我在看".NET SDK文档"时,不断弹出"Visual Studio .NET Enterprise Architect - CHS"安装
- .net如何利用session统一分配请求
- C#(winfrom) 单击datagirdview的行时数据能在textbox中对应的显示出来?
"3*4".split('*')[1]
private System.Windows.Forms.Label label3;
this.label3.Location = new System.Drawing.Point(8, 56);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(3, 4);
把3和4取出来
"3*4".split('*')[0]
"3*4".split('*')[1]然后写个循环,在里面把Lable加到上面
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace Lb34
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{
Go(3, 4);
} private void Go(int a, int b)
{
for (int i = 0; i < a; i++)
{
for (int j = 0; j < b; j++)
{
Label lb = new Label();
lb.Text = i.ToString() +"x"+j.ToString();
lb.Name = lb.Text;
lb.Left = j * 80;
lb.Top = i * 90;
this.Controls.Add(lb);
}
}
}
}
}