我最近在寫一個跑馬燈的程式想讓它走完左邊3圈之後換右邊三圈,請問我應該還加哪些步驟
Dim a As Integer
Private Sub Form_Load()
a = 9
End Sub
Private Sub Timer1_Timer()
Label1(a).BackColor = &H80C0FF
a = a - 1
If a = 0 Then
a = 9
End If
Label1(a).BackColor = &H808080
End Sub
這是程式碼
請知道如何改的大大幫幫小弟好嗎
[localimg=180,113]1[/localimg]作者: yyyyman 時間: 2009-4-6 12:46 AM
Private Sub Form_Load()
a = 10
b = 1
c = 0
d = 1
End Sub
Private Sub Timer1_Timer()
If b <= 3 Then
Label1(a).BackColor = &H80C0FF
Label2.Caption = "逆時針(C.C.W)第" & b & "圈"
a = a - 1
If a = 0 Then
a = 10
b = b + 1
End If
Label1(a).BackColor = &HFF00&
Else
Label1(10).BackStyle = 0
Label1(c).BackColor = &H80C0FF
Label2.Caption = "順時針(C.W)第" & d & "圈"
c = c + 1
If c = 10 Then
If d = 3 Then
Timer1.Interval = 0
c = 0
Label2.Caption = "停止"
Else
c = 0
d = d + 1
End If
End If
Label1(c).BackColor = &HFF00&
End If
End Sub
假如我把Lebal1(10)改成Lebal1(0)要如何讓它跑呢?
小弟有試過彈沒辦法跑,請大大們再次幫幫小弟這個程式的改法好嗎?
小弟會非常感激的