private void Form1_Resize(object sender, EventArgs e) { Random r = new Random(); int lb_x= r.Next(10, 500); int lb_y = r.Next(10,500); int pb_x = r.Next(10, 500); int pb_y = r.Next(10, 500); this.pictureBox1.Location = new Point(pb_x, pb_y); this.label1.Location = new Point(lb_x, lb_y); }
pictureBox.Location.x=1;
pictureBox.Location.y=1;
pictureBox1.Size=new Size(300,400);
pictureBox1.Location=new Point(100,120);
label.Location = new Point(345, 555);
private void Form1_Resize(object sender, EventArgs e)
{
Random r = new Random();
int lb_x= r.Next(10, 500);
int lb_y = r.Next(10,500); int pb_x = r.Next(10, 500);
int pb_y = r.Next(10, 500); this.pictureBox1.Location = new Point(pb_x, pb_y);
this.label1.Location = new Point(lb_x, lb_y); }