在from1.Designer.cs文件中添加
this.MouseWheel += new MouseEventHandler(Form1_MouseWheel);
在from1.cs文件中添加
void Form1_MouseWheel(object sender, MouseEventArgs e)
{
var size = pictureBox1.Size;
size .Width += e.Delta;
size .Height += e.Delta;
pictureBox1.Size = size ;
}