Public Class Form1
    Private W As Integer, H As Integer  '定义成员变量，表示图片框宽度和高度
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        W = PictureBox1.Width
        H = PictureBox1.Height
        PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
        RadioButton3.Checked = True
    End Sub
    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        ' 缩小图片 
        PictureBox1.Width = CInt((W * 0.5))
        PictureBox1.Height = CInt((H * 0.5))
    End Sub
    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
        ' 放大图片 
        PictureBox1.Width = W * 2
        PictureBox1.Height = H * 2
    End Sub

    Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
        '还原图片 
        PictureBox1.Width = W
        PictureBox1.Height = H
    End Sub
End Class
