开发者

How to colour text in C#

开发者 https://www.devze.com 2023-03-10 05:03 出处:网络
Given a Windows F开发者_如何转开发orms application with a label: label18 = new Label(); label18.Text = \"Installed and started\";

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

精彩评论

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