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);
}
}