C#线程
private Thread t;
public Form1()
{
InitializeComponent();
ThreadStart ts = new ThreadStart(Do);
t = new Thread(ts);
t.Start();
timer1.Start();
}
public void Do()
{
while (true)
{
Timer tm = new System.Windows.Forms.Timer();
//........
t.Join(100000);
}
}
private void timer1_Tick(object sender, EventArgs e)
{
for (int i = 0; i <= 10000; i++)
{
System.Threading.Thread.Sleep(10);
}
}