Home > Back-end >  How Do I make a text change color when i click a button? (Visual Studio C# Windows Forms App)
How Do I make a text change color when i click a button? (Visual Studio C# Windows Forms App)

Time:10-11

I want the color of the "not attached" text to change to green when the "execute" button is clicked. Also the "not attached" text is a text label.

CodePudding user response:

lblNotAttached.ForeColor = Color.Green;

CodePudding user response:

Example:

private void button1_Click(object sender, EventArgs e)
{
     label1.ForeColor = Color.FromArgb(255,255,255);
}
  • Related