VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00C0E0FF&
   Caption         =   "Move方法例"
   ClientHeight    =   2205
   ClientLeft      =   1095
   ClientTop       =   1515
   ClientWidth     =   3270
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   2205
   ScaleWidth      =   3270
   Begin VB.Line Line2 
      X1              =   1617
      X2              =   1617
      Y1              =   0
      Y2              =   2520
   End
   Begin VB.Line Line1 
      X1              =   0
      X2              =   4080
      Y1              =   1080
      Y2              =   1080
   End
   Begin VB.Image Image1 
      Height          =   855
      Left            =   0
      Picture         =   "v6j02-10.frx":0000
      Stretch         =   -1  'True
      ToolTipText     =   "单击此图"
      Top             =   0
      Width           =   855
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
     '本段代码可在设计时完成
     Image1.Top = 0              ' 图形定位在窗体的左上角
     Image1.Left = 0
     Image1.Picture = LoadPicture(App.Path + "\So02963_.wmf")        ' 装入图形
End Sub
' 单击图形框，移动图形框到窗体中心位置
Private Sub Image1_Click()
  Image1.Move (Form1.ScaleWidth - Image1.Width) \ 2, (Form1.ScaleHeight - Image1.Height) \ 2
  '也可使用Left、Top属性移动对象
  'Image1.Left = (Form1.ScaleWidth - Image1.Width) \ 2     ' 将图像框定位到窗体中心
  'Image1.Top = (Form1.ScaleHeight - Image1.Height) \ 2
End Sub


