VB编程:Timer控件中使用计数变量

程序代码:

Private myint As Integer

Private Sub Form_Load()

   myint = 0

End Sub


Private Sub Timer1_Timer()

   myint = myint + 1

   If myint = 2 Then Me.BackColor = vbGreen

   If myint = 4 Then Me.BackColor = vbRed

   If myint = 6 Then Me.BackColor = vbBlue

   If myint = 10 Then myint = 0

End Sub

上一篇:使用docker下载搭建TeamCity容器并使用


下一篇:Partition 1 does not start on physical sector boundary