1. 可能你贴错代码了,下面应该是Size而不是Point, Point 只是一个坐标
PictureBox.Size = New Point(PictureBox.Image.Width, PictureBox.Image.Height)
2. 其实panel的大小应该已经固定,我们需要在 picturebox的size变化的时候处理下picturebox的位置, 比如我们想要它一直居中,则可以尝试以下方式。
Private Sub PictureBox1_Resize(sender As Object, e As EventArgs) Handles PictureBox1.Resize
Me.Panel1.VerticalScroll.Value = 0
Me.Panel1.HorizontalScroll.Value = 0
If Me.PictureBox1.Image IsNot Nothing Then
Dim picSize As Size = Me.PictureBox1.Image.Size
Dim panSize As Size = Me.Panel1.Size
If picSize.Height < panSize.Height Then
Me.PictureBox1.Location = New Point(Me.PictureBox1.Location.X, (panSize.Height - picSize.Height) / 2)
Else
Me.PictureBox1.Location = New Point(Me.PictureBox1.Location.X, 0)
End If
If picSize.Width < panSize.Width Then
Me.PictureBox1.Location = New Point((panSize.Width - picSize.Width) / 2, Me.PictureBox1.Location.Y)
Else
Me.PictureBox1.Location = New Point(0, Me.PictureBox1.Location.Y)
End If
End If
End Sub

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.