Привет всем
Собственно вот сам код :
Собственно вот сам код :
Код:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace Lesson
{
public partial class Form1 : Form
{
Color[] colors = new Color[4] { Color.Red, Color.Green, Color.Yellow, Color.Lime };
public Form1()
{
InitializeComponent();
Thread Back = new Thread(isBackGround);
Back.IsBackground = true;
Back.Start();
}
public void isBackGround()
{
Thread Back = new Thread(isBackGround);
Back.IsBackground = true;
for (int x = 0; x < 4; x++)
{
Thread.Sleep(1500);
label1.ForeColor = colors[x];
}
Back.Start();
}
}
}