[vb]代码库
Option Explicit
Private Sub Command2_Click()
If Timer1.Enabled = True Then
Timer1.Enabled = False
Command2.Caption = "开始闪烁"
Else
Command2.Caption = "停止闪烁"
Timer1.Enabled = True
End If
End Sub
Private Sub Timer1_Timer()
Chc Label1, 1, 3, 5, 8, 10, 12, 14
End Sub
Sub Chc(Cont As Control, Color1 As Integer, Color2 As Integer, Color3 As Integer, Color4 As Integer, Color5 As Integer, Color6 As Integer, Color7 As Integer)
If Val(Cont.Tag) = Color1 Then
Cont.Tag = Color2
ElseIf Val(Cont.Tag) = Color2 Then
Cont.Tag = Color3
ElseIf Val(Cont.Tag) = Color3 Then
Cont.Tag = Color4
ElseIf Val(Cont.Tag) = Color4 Then
Cont.Tag = Color5
ElseIf Val(Cont.Tag) = Color5 Then
Cont.Tag = Color6
ElseIf Val(Cont.Tag) = Color6 Then
Cont.Tag = Color7
ElseIf Val(Cont.Tag) = Color7 Then
Cont.Tag = Color1
Else
Cont.Tag = Color1
End If
Cont.ForeColor = QBColor(Cont.Tag)
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
[源代码打包下载]
by: 发表于:2017-11-06 14:47:37 顶(0) | 踩(0) 回复
??
回复评论