1个回答
展开全部
在窗体上画一timer控件和一文本框,然后写以下代码:
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Randomize
x = Int(Rnd() * 90 + 10)
Text1.FontSize = x
Randomize
a = Int(Rnd() * 255)
b = Int(Rnd() * 255)
c = Int(Rnd() * 255)
Form1.BackColor = RGB(a, b, c)
End Sub
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Randomize
x = Int(Rnd() * 90 + 10)
Text1.FontSize = x
Randomize
a = Int(Rnd() * 255)
b = Int(Rnd() * 255)
c = Int(Rnd() * 255)
Form1.BackColor = RGB(a, b, c)
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询