Hi all,

How i changing the color of label caption dynamically, so it looks like highlight text changing color.

Thank you.

Recommended Answers

See if this help.

Add a timer, set interval to 1000 (or you can assign as you needed)
And use this following code :
[CODE]Private Sub Timer1_Timer()
Label1.ForeColor = RGB(Rnd 255, Rnd 255, Rnd * 255)
End Sub[/CODE]

Jump to Post

All 2 Replies

See if this help.

Add a timer, set interval to 1000 (or you can assign as you needed)
And use this following code :

Private Sub Timer1_Timer()
Label1.ForeColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
End Sub
commented: Perfect +2

Thank you it worked perfect.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.