新手提问:关于怎么使窗体自动适应图片大小的有关问题

新手提问:关于如何使窗体自动适应图片大小的问题
本人刚学vb,还有很多地方不懂,特来请教大虾们
  问题是这样:我有一个form1的窗体,里面有一个image控件,我是想使在form2中显示image中的图片,并使其根据图片的大小自动更改窗体的大小。
  我写的部分代码如下:
  form2.Picture = form1.Image1.Picture
  form2.Height = Image1.Picture.Height
  form2.Width = Image1.Picture.Width
  我尝试过使用ScaleHeight也不能准确调整窗体,相信是图片单位的处理没有做好。还有想问一下,Image1.Picture的单位是twip,还是像素?我已把窗体的scaleMode设置成像素。

------解决方案--------------------
VB6 / xpsp2 pass 

VBScript code

Private Sub Command2_Click()
With Form2
        .Image1.Picture = Form1.Image1.Picture
        .Image1.Stretch = True
       .Width = .Image1.Width + 120
        .Height = .Image1.Height + 500
        .Show
    End With
End Sub

------解决方案--------------------
ScaleMode 统一用 twips。
窗体大小应该加上4边宽度。
form2.Height = Image1.Picture.Height + (form2.height - form2.scaleheight)
form2.Width = Image1.Picture.Width + (from2.width - form2.scalewidth)