How to colour text in C#
Given a Windows F开发者_如何转开发orms application with a label:
label18 = new Label();
label18.Text = "Installed and started";
this.Controls.Add(label18);
How do you set the colour?
label18.ForeColor = Color.Red;
for red forecolor or
label18.BackColor = Color.Blue;
for blue backcolor.
label18.ForeColor = Color.Red;
For red, for example.
精彩评论