private void timer1_Tick(object sender, System.EventArgs e)
{
if (textBox1.ForeColor.B == 255)
{
textBox1.ForeColor =Color.FromArgb(textBox1.ForeColor.R,textBox1.ForeColor.G,0);
if (textBox1.ForeColor.G == 255)
{
textBox1.ForeColor = Color.FromArgb(textBox1.ForeColor.R,0,0);
if (textBox1.ForeColor.R == 255)
{
textBox1.ForeColor = Color.FromArgb(0,0,0);
}
else
{
textBox1.ForeColor = Color.FromArgb(textBox1.ForeColor.R + 1,0,0);
}
}
else
{
textBox1.ForeColor = Color.FromArgb(textBox1.ForeColor.R,textBox1.ForeColor.G + 1,0);
}
}
else
{
textBox1.ForeColor = Color.FromArgb(textBox1.ForeColor.R,textBox1.ForeColor.G,textBox1.ForeColor.B + 1);
}
}
{
if (textBox1.ForeColor.B == 255)
{
textBox1.ForeColor =Color.FromArgb(textBox1.ForeColor.R,textBox1.ForeColor.G,0);
if (textBox1.ForeColor.G == 255)
{
textBox1.ForeColor = Color.FromArgb(textBox1.ForeColor.R,0,0);
if (textBox1.ForeColor.R == 255)
{
textBox1.ForeColor = Color.FromArgb(0,0,0);
}
else
{
textBox1.ForeColor = Color.FromArgb(textBox1.ForeColor.R + 1,0,0);
}
}
else
{
textBox1.ForeColor = Color.FromArgb(textBox1.ForeColor.R,textBox1.ForeColor.G + 1,0);
}
}
else
{
textBox1.ForeColor = Color.FromArgb(textBox1.ForeColor.R,textBox1.ForeColor.G,textBox1.ForeColor.B + 1);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货