VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "VB6 例10-01b 控件对象在坐标系内的定位"
   ClientHeight    =   3705
   ClientLeft      =   1095
   ClientTop       =   1515
   ClientWidth     =   6405
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   3705
   ScaleWidth      =   6405
   Begin VB.PictureBox Picture1 
      Height          =   765
      Left            =   1080
      Picture         =   "V6bj10-01b.frx":0000
      ScaleHeight     =   705
      ScaleWidth      =   1530
      TabIndex        =   3
      Top             =   1080
      Width           =   1590
   End
   Begin VB.CommandButton Command2 
      Caption         =   "右移"
      Height          =   315
      Left            =   4680
      TabIndex        =   2
      Top             =   3120
      Width           =   1080
   End
   Begin VB.CommandButton Command1 
      Caption         =   "左移"
      Height          =   315
      Left            =   4680
      TabIndex        =   1
      Top             =   2640
      Width           =   1080
   End
   Begin VB.Label Label4 
      Caption         =   "X"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   5640
      TabIndex        =   6
      Top             =   0
      Width           =   135
   End
   Begin VB.Label Label3 
      Caption         =   "Y"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   3240
      Width           =   135
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "0"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   360
      TabIndex        =   4
      Top             =   240
      Width           =   135
   End
   Begin VB.Label Label1 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   720
      TabIndex        =   0
      Top             =   2520
      Width           =   2730
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Coordinate()
    Cls
    Line (0, 0)-(5400, 0)
    Line (0, 0)-(0, 3800)
    Label1.Caption = "Form.ScaleLeft= " & Form1.ScaleLeft & Chr(13) & "Form.ScaleTop = " & Form1.ScaleTop
    Picture1.Top = 1080: Picture1.Left = 1080
    Label2.Top = 120: Label2.Left = 120
    Label3.Top = 3240: Label3.Left = 120
    Label4.Top = 120: Label4.Left = 5340
End Sub

Private Sub Command1_Click()
    Form1.ScaleLeft = 100 + Form1.ScaleLeft
    Form1.ScaleTop = 100 + Form1.ScaleTop
    Coordinate
End Sub

Private Sub Command2_Click()
    Form1.ScaleLeft = Form1.ScaleLeft - 100
    Form1.ScaleTop = Form1.ScaleTop - 100
    Coordinate
End Sub

