利用线程的方法 做延时 不卡界面
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; }

浙公网安备 33010602011771号