static public void Zoom(PictureBox pictureBox, int zoom, int currentZoom) { if (pictureBox.Width != 0) { if (LastZoom < currentZoom) { pictureBox.Width += zoom; pictureBox.Height += zoom; } else { pictureBox.Width -= zoom; pictureBox.Height -= zoom; } } else { pictureBox.Width = 10; pictureBox.Height = 10; } LastZoom = currentZoom; }