Hi Team
Is the way i can change i have a label and want it to be red, when by default its taking original forecolor not the code logic to be red. IM using windows form in 4.5 c#.
Hi Team
Is the way i can change i have a label and want it to be red, when by default its taking original forecolor not the code logic to be red. IM using windows form in 4.5 c#.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jayraj ChhayaRank #304 · 8.2K reputationPosted Feb 28, 2024, 8:10 AM EST
Hi
Set the Forecolor property of the label as below
using System; using System.Windows.Forms; using System.Drawing; namespace WindowsFormsApp { public partial class Form1 : Form { public Form1() { InitializeComponent(); // Change the label's color to red label1.ForeColor = Color.Red; } } }