using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace exp4_5 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { //1.方法1 pictureBox1.Location = new Point(600, 44); //2.方法2(錯誤的) //pictureBox1.Location.X = 600; //pictureBox1.Location.Y = 44; } private void button2_Click(object sender, EventArgs e) { pictureBox1.Size = new Size(30, 30); } private void button3_Click(object sender, EventArgs e) { pictureBox1.Size = new Size(200, 200); } } }