开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜