代码如下:
private void button1_Click(object sender, EventArgs e) { // 遍历窗体所以控件 foreach (Control c in this.Controls) { // 检查控件是否为PictureBox if (c is PictureBox) { // 是,着向左边移动 c.Left += 10; } } }