我用VB写了一个画线的程序,请问怎么显示画曲线过程
程序如下:
Timer1.Interval = 10000 '100毫秒
Timer1.Enabled = True
Picture1.CurrentX = pen(1).PenPointx
Picture1.CurrentY = pen(1).PenPointy
For temp1 = 1 To pointcount - 1
Timer1_Timer
Next temp1
Private Sub Timer1_Timer()
If (pen(temp1).PenPointx = -1 And pen(temp1).PenPointy = -1) Then
Picture1.CurrentX = pen(temp1 + 1).PenPointx * (1 / 2)
Picture1.CurrentY = pen(temp1 + 1).PenPointy * (1 / 2)
Else
Picture1.Line -(pen(temp1).PenPointx * (1 / 2), pen(temp1).PenPointy * (1 / 2))
End If
If (temp1 Mod 6 = 0) Then
Timer1.Interval = 0
Timer1.Enabled = False
End If
'这行写上画到一定长度停止timer1的判断代码
End Sub
我是想每画6个点,就触发一次
Timer1.Interval设这么大了,怎么还是没效果?