gpt4 book ai didi

c# - 如何在 C# 中为文本着色

转载 作者:太空宇宙 更新时间:2023-11-03 20:33:29 25 4
gpt4 key购买 nike

给定一个带有标签的 Windows 窗体应用程序:

label18 = new Label();
label18.Text = "Installed and started";
this.Controls.Add(label18);

如何设置颜色?

最佳答案

label18.ForeColor = Color.Red;

用于红色前景色或

label18.BackColor = Color.Blue;

用于蓝色背景。

关于c# - 如何在 C# 中为文本着色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6238906/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com