Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing background colour of a label in C#

Tags:

c#

I need to change the background colour of a label in my GUI when a variable reaches a certain value. How would i go about doing this

Would it be something like this:

 if(timeLimit == value){
             Label.BackColor=System.Drawing.Color.Red;
         }

I need to be able to do this once the timer in my application reaches 5 seconds remaining.

I'm using Windows forms in Visual Studio 2010.

like image 488
sean_hi Avatar asked Aug 09 '10 00:08

sean_hi


1 Answers

Whenever the event is triggered change the color with labelName.BackColor = Color.Blue

like image 87
Ashley Grenon Avatar answered Sep 22 '22 01:09

Ashley Grenon