Thread t = new Thread(o => Thread.Sleep(500)); t.Start(this); while (t.IsAlive) { Application.DoEvents(); }
不用线程 也可以这样不卡界面
public static void Delay(int mm) { DateTime current = DateTime.Now; while (current.AddMilliseconds(mm) > DateTime.Now) { Application.DoEvents(); } return; }