Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Label1.ForeColor = System.Drawing.Color.Red
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick Label1.ForeColor = System.Drawing.Color.Pink End Sub 經過測試,通過!TIMER1 的INTERVAL 為1000,TIMER2 的INTERVAL 為1500. 不要設置為整數倍數. 誰有更好的方法.請貼上來.
剛試出一個好的方法. 可以做出多種顏色的交換顯示.三個TIMER的INTERVAL都一樣. Private Sub Timer1_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer1.Tick Label1.BackColor = System.Drawing.Color.Red Timer1.Enabled = False Timer2.Enabled = True End Sub
Private Sub Timer2_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer2.Tick Label1.BackColor = System.Drawing.Color.SeaGreen Timer2.Enabled = False Timer3.Enabled = True End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick Label1.BackColor = System.Drawing.Color.LightGray Timer3.Enabled = False Timer1.Enabled = True End Sub 哈哈哈!!!試試!!!是不是很爽呀!!!! O-LA-O-LA