Try it this way:
private void button1_Click(object sender, EventArgs e)
{
Label l = new Label();
l.Location = new Point(100, 100);
l.Text = "This is a text";
this.Controls.Add(l);
}
Mitja Bonca
Nearly a Posting Maven
2,485 posts since May 2009
Reputation Points: 641
Solved Threads: 474
where are you writing the code of adding text to the label?
abelLazm
Postaholic
2,113 posts since Feb 2011
Reputation Points: 219
Solved Threads: 124
ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661