label1的文字颜色,按指定时间间隔随机变化
1个回答
展开全部
Private Sub Form_Load()
Timer1.INTERVAL = 1000
End Sub
Private Sub Timer1_Timer()
Randomize
changeColor RGB(Int(Rnd * 255) + 1, Int(Rnd * 255) + 1, Int(Rnd * 255) + 1)
changeSize Int(Rnd * 30) + 10
End Sub
Sub changeColor(x&)
Label1.ForeColor = x
End Sub
Sub changeSize(x&)
Label1.FontSize = x
End Sub
Timer1.INTERVAL = 1000
End Sub
Private Sub Timer1_Timer()
Randomize
changeColor RGB(Int(Rnd * 255) + 1, Int(Rnd * 255) + 1, Int(Rnd * 255) + 1)
changeSize Int(Rnd * 30) + 10
End Sub
Sub changeColor(x&)
Label1.ForeColor = x
End Sub
Sub changeSize(x&)
Label1.FontSize = x
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询