Hi all,

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

Thank you.

Recommended Answers

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.