我希望我的程序不断更改字体背景颜色,但我希望它顺利进行所以我尝试修改一个Color变量Color custom;并将其用于表单的背景颜色this.BackColor = custom;但是它不起作用我不知道如何使它工作,这是完整的代码:
private void Principal_Load(object sender, EventArgs e)
{
Color custom;
int contr = 0, contg = 0, contb = 0;
do
{
while (contr < 255 && contg == 0)
{
if (contb != 0)
{
contb--;
}
contr++;
while (contg < 255 && contb == 0)
{
if (contr != 0)
{
contr--;
}
contg++;
while (contb < 255 && contr == 0)
{
if (contg != 0)
{
contg--;
}
contb++; …Run Code Online (Sandbox Code Playgroud)