private ArrayList label= new ArrayList(30);
Label label_class = new Label();
Random r = new Random();
for (int i = 0; i < label.Count; i++) {
((Label)label[i]).Location = new Point(r.Next(ClientRectangle.Right -10),
r.Next(ClientRectangle.Bottom - 10));
((Label)label[i]).Text = "o";
((Label)label[i]).Click += new EventHandler(Form1_Load);
this.Controls.Add((Label)label[i]);
((Label)label[i]).Show();
}
This for loop is inside the Form1_Load
so that it will run when the form is loading..
the problem is that, when I break point, I see that the code inside the forloop is not noticed by the break point/does not run. why is that?? and how can i create many labels randomly placed on form1(window form)