Private Sub MDIForm_Resize()
Dim x As Single, y As Single
Picture1.Width = Me.Width
'改变图片的大小
Image1.Width = Picture1.Width ' / 2
Image1.Height = Picture1.Height '/ 2
'改变图片位置
Image1.Left = Picture1.Width / 2 - Image1.Width / 2
Image1.Top = Picture1.Height / 2 - Image1.Height / 2
'画到PictureBox的相应位置
Picture1 = Nothing
Picture1.PaintPicture Image1, Image1.Left, Image1.Top, Image1.Width, Image1.Height
'把PictureBox的图片传给主窗体
Me.Picture = Picture1.Image
End Sub
Private Sub MDIForm_Load()
Picture1.AutoRedraw = True
Picture1.Visible = False
Picture1.BackColor = Me.BackColor
Picture1.Align = 3
End Sub