Public a
Private Sub Command1_Click()
MsgBox (a) '显示变量
End Sub
Private Sub Form_Load()
a = 1
Timer1.Interval = 1000 * 10 '定时器10秒
X1 = Array(0, 1000, 1100, 2500, 2800, 2900, 3100, 3300, 4300, 4400, 6000, 6200, 6300, 6400, 6600)
Y1 = Array(1000, 1000, 1500, 2000, 4000, 7000, 6000, 1000, 1000, 2200, 3200, 5000, 7000, 6000, 1500)
Show
For i = 0 To 13 '划线
Line (X1(i), Y1(i))-(X1(i + 1), Y1(i + 1)), vbRed
Next
End Sub
Private Sub Timer1_Timer()
a = 0
Timer1.Interval = 0 '10秒后关闭定时器
End Sub