[原创]有关窗体的问题
请教一下怎样使窗体的颜色不停的变换?
private void Form5_Load(object sender, System.EventArgs e)
{
timer1.Enabled = true;
}
private void timer1_Tick(object sender, System.EventArgs e)
{
Random random = new Random();
this.BackColor = Color.FromArgb(random.Next(0, 255), random.Next(0, 255), random.Next(0, 255));
}
把Interval属性改一下,效果会更好。