Sub Draw(Form As PictureBox, x As Integer, y As Integer)
Const Offset AsSingle = 0.5
Dim i As Long
***.autoredraw= True
***.scale (-x,y)-(x, -y) '定义坐标系
***.line (-x,0)-(x, 0) 'X轴
***.line (0,-y)-(0, y) 'Y轴
For i = -x To x- 1
***.line(i, 0)-(i, 0.2) 'X轴点
Next i
For i = -y To y- 1
***.line(0, i)-(0.2, i) 'Y轴点
Next i
***.line (x,0)-(x - Offset, Offset) 'X箭头
***.line (x,0)-(x - Offset, -Offset)
***.line (0,y)-(-Offset, y - Offset) 'Y箭头
***.line (0,y)-(Offset, y - Offset)
End Sub
Private Sub Command2_Click()
***.cls
Draw Picture1,10, 10
End Sub