问题描述:

Solved: Using design toolbox.

I'm using the following method to add a image

 private void cobertura1vertente_Load(object sender, EventArgs e)

{

PictureBox pb1 = new PictureBox();

pb1.Image = Image.FromFile("C:/cobertura1vertente.png");

pb1.Location = new Point(3, 3);

pb1.Size = new Size(250, 250);

//doubt right below

groupBox81.Controls.Add(pb1);

}

I usually would add a image to a entire form, but now i want to add it to a specific groupbox, who lies inside a tab.

If the code is correct, my guess is that the location that i've set is relative to the whole form, and not to the groupBox, why would that happen?

相关阅读:
Top