arpanmukherjee1
XLr8
hello,
i have a panel.
i add label and a pictureBox using this :
what i want is to retrieve the picturebox control as System.Windows.Forms.PictureBox.
every function like find() returns Control[]
how to do this??
i have a panel.
i add label and a pictureBox using this :
Code:
private void AddLabelAndImage(ref Point startPoint, string labelText, System.Drawing.Image image)
{
Label label = new Label();
panel1.Controls.Add(label);
label.Text = labelText;
label.Name = "text";
label.Width = 100;
label.Height = 30;
label.Location = startPoint;
startPoint.Y += label.Height;
System.Windows.Forms.PictureBox box = new PictureBox();
panel1.Controls.Add(box);
box.Name = "image";
box.Size = image.Size;
box.Image = image;
box.Location = startPoint;
startPoint.Y += box.Height + 10;
what i want is to retrieve the picturebox control as System.Windows.Forms.PictureBox.
every function like find() returns Control[]
how to do this??