1             Label SnLable = new Label
2             {
3                 Size = new Size(SnLength, SnLength),
4                 BackColor = Color.Red,
5                 Location = new Point(10, 10),
6                 BorderStyle = BorderStyle.FixedSingle
7             };
8 
9             this.Controls.Add(SnLable);

 

写完之后不要忘记this.Controls.Add(SnLable);

相关文章:

  • 1970-01-01
  • 2021-12-31
  • 2021-10-25
  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2021-12-08
相关资源
相似解决方案