[分享]写了个简单的自动变色程序
偶菜 写来玩滴 望各路大虾给与指点
代码:
Dim a As Integer
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Form1.Caption = "每秒自动变色"
Timer1.Enabled = False
Timer1.Interval = 1000
Command1.Caption = "开始变色"
Label1.Caption = "lxdwwei 2007.7.24"
Label1.BackColor = vbGreen
a = 0
End Sub
Private Sub Timer1_Timer()
If a = 15 Then
Form1.BackColor = QBColor(a)
a = 0
Else
Form1.BackColor = QBColor(a)
a = a + 1
End If
If Label1.Visible = True Then
Label1.Visible = False
Else
Label1.Visible = True
End If
Form1.Caption = QBColor(a)
End Sub