注册 登录
编程论坛 VB6论坛

求指导!!!!!!!此程序是vb贪吃蛇上面的timer3代码是什么意思????

wojiushiayan 发布于 2012-10-25 15:51, 341 次点击
Private Sub Timer3_Timer()
p1 = p1 + 1
 p = p + 1
Dim i As Integer
 If p Mod 2 = 1 Then
  

For i = 0 To maxlong Step 1
 Shape1(i).Visible = False
Next i
Else


For i = 0 To maxlong Step 1
Shape1(i).Visible = True
Next i

End If
If p1 = 6 Then
Timer3.Enabled = False

'MsgBox "结束游戏!!"
End If
Screen.MousePointer = vbArrow
End Sub
1 回复
#2
Artless2012-10-25 23:39
如果p是素数则
Shape1(0 To maxlong)不显示
否则
Shape1(0 To maxlong)显示
如果p1=6则
timer3停止
1