VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   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 (-8, 2)-(8, -2)                 ' 定义坐标系
    Line (-7.5, 0)-(7.5, 0): Line (0, 1.9)-(0, -1.9)        ' 画X轴与Y轴
    CurrentX = 7.5: CurrentY = 0.2: Print "X"
    CurrentX = 0.5: CurrentY = 2: Print "Y"
    For i = -7 To 7                             ' 在X轴上标记坐标刻度，线长0.1
        Line (i, 0)-(i, 0.1)
        CurrentX = i - 0.2: CurrentY = -0.1: Print i
    Next i
    For i = -1 To 1                             ' 在Y轴上标记坐标刻度
        If i <> 0 Then
            CurrentX = -0.7: CurrentY = i + 0.1: Print i
            Line (0.5, i)-(0, i)
        End If
    Next i
    CurrentX = -6.283: CurrentY = 0             ' 设置起点坐标
    For i = -6.283 To 6.283 Step 0.01
        x = i: y = Sin(i)                       ' 设置下一点坐标
        Line -(x, y)                            ' 从当前点画到下一点
    Next i
End Sub

