VB怎么让滚动条自动的让标签变色
Private Sub HScroll1_Change()
Label1.ForeColor = RGB(Int(Rnd(HScroll1.Value) * 256), Int(Rnd(HScroll1.Value) * 256), Int(Rnd(HScroll1.Value) * 256))
Label1.BackColor = RGB(Int(Rnd(HScroll1.Value) * 256), Int(Rnd(HScroll1.Value) * 256), Int(Rnd(HScroll1.Value) * 256))
End Sub
Private Sub HScroll1_Scroll()
Label1.ForeColor = RGB(Int(Rnd(HScroll1.Value) * 256), Int(Rnd(HScroll1.Value) * 256), Int(Rnd(HScroll1.Value) * 256))
Label1.BackColor = RGB(Int(Rnd(HScroll1.Value) * 256), Int(Rnd(HScroll1.Value) * 256), Int(Rnd(HScroll1.Value) * 256))
End Sub