I've made a picturebox.
public void create(Form1 u, int number, int x, int y)
{
pictureBox1 = new PictureBox();
pictureBox1.Location = new Point(x, y);
pictureBox1.Name = "invader" + number;
pictureBox1.Size = new Size(60, 54);
pictureBox1.Image = Image.FromFile("../sprite.jpg");
pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
u.Controls.Add(pictureBox1);
}
How do I move this by like 1 pixel every 20 milliseconds? I got a timer and I've tried a few things but I do not know how to properly select the picture box that this class had made so I can move it (it all has to be written within this class) I want the box to move down. The X coordinate should stay the same.
private void timer1_Tick(object sender, EventArgs e)
{
}
My super exciting timer code. It is located in the main form code.