What's new

.NET Color Changing Label?

pLTPF

pLTPF

I am NOT LeafyIsHere
Messages
2,281
Reaction score
558
Points
325
Sin$
0
I have used good and I can't figure out how to make a label that change random colors not in any specific order.
 
S7 Pro

S7 Pro

Seasoned Member
Modder Programmer
Messages
2,511
Reaction score
1,599
Points
560
Sin$
7
I just wrote this up, if you need any additional help feel free to pm.

There is probably a much better way at stopping, or ultimately terminating that thread.


It's much simpler to use the Timer in C#, it'll be managed for you, and you can set the timer interval without worry of accidentally locking up your own threads. Just place your label changing code in the Timer::Tick method.
 
vRice

vRice

Enthusiast
Messages
434
Reaction score
206
Points
170
Sin$
0
Wow it's been a long time since I did some random aRBG things haha, here you go
The a stands for the alpha of the colour btw!

C#:
private void timer1_Tick(object sender, EventArgs e)
{
    Random randInt = new Random();
    label1.ForeColor = Color.FromArgb(randInt.Next(0, 255), randInt.Next(0, 255), randInt.Next(0, 255), randInt.Next(0, 255));
}


mVwhJb6Bjq.gif
 
pLTPF

pLTPF

I am NOT LeafyIsHere
Messages
2,281
Reaction score
558
Points
325
Sin$
0
I just wrote this up, if you need any additional help feel free to pm.

There is probably a much better way at stopping, or ultimately terminating that thread.


Thanks will be sure to give credit on my tool.
 
Top Bottom
Login
Register