VERSION 5.00
Begin VB.Form Form1 
   AutoRedraw      =   -1  'True
   Caption         =   "VB6 例10-8 坐标轴与坐标刻度"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Form_Click()
    Cls
    Form1.Scale (-110, 110)-(110, -110)      ' 定义坐标系
    Line (-105, 0)-(105, 0): Line (0, 105)-(0, -105)    ' 画X轴与Y轴
    CurrentX = 105: CurrentY = 20: Print "X"
    CurrentX = 10: CurrentY = 105: Print "Y"
    For i = -100 To 100 Step 20                 ' 在X轴上标记坐标刻度
        If i <> 0 Then
            CurrentX = i: CurrentY = 7: Line -(i, 0)
            CurrentX = i - 5: CurrentY = -5: Print i / 10
        Else
            CurrentX = -3: CurrentY = -5: Print 0
        End If
    Next i
    For i = -100 To 100 Step 20                 ' 在Y轴上标记坐标刻度
        If i <> 0 Then
            CurrentX = -15: CurrentY = i + 5: Print i / 10
            CurrentX = 7: CurrentY = i: Line -(0, i)
        End If
    Next i
End Sub

