我需要在生成的事情上为C#提供一些帮助。
我尝试过它并没有奏效。继承我的代码:
public static void MakeNewLabel()
{
Label myLabel = new Label();
myLabel.Name = "myLabelName";
myLabel.Text = "";
myLabel.Location = new Point(13, min_char + 3);
myLabel.Visible = true;
}
答案 0 :(得分:0)
public static Label MakeNewLabel()
{
Label myLabel = new Label();
myLabel.Name = "myLabelName";
myLabel.Text = "";
myLabel.Location = new Point(13, min_char + 3);
myLabel.Visible = true;
return myLabel;
}
this.Controls.Add(MakeNewLabel());
试试上面的