Hi,
I think you got to add it to the place where you want it to be visible..
in ur case it seems that u want it to be displayed in the form..
so ...
Label x = new Label();
x.Name = "node1";
x.Location = new System.Drawing.Point(200, 200);
x.Text = "Hello";
x.TabIndex = 1;
this.Controls.add(x);
Nirosh.
"Xarky" <be*********@yahoo.com> wrote in message
news:bc*************************@posting.google.co m...
Hi,
I am trying to create a Label for a Windows Form, with my own code.
Its not being visible. The code being used is the following.
Label x = new Label();
x.Name = "node1";
x.Location = new System.Drawing.Point(200, 200);
x.Text = "Hello";
x.TabIndex = 1;
x.Show();
x.Refresh();
Can someone help.
Thanks