C#NET窗口延时不卡顿的方法及代码毫秒级


 1 public static void Delay(int mm)
 2 {
 3     while (DateTime.Now.AddMilliseconds((double)mm) > DateTime.Now)
 4     {
 5         Thread.Sleep(100);这里设置1到100都可以
 6         Application.DoEvents();
 7     }
 8 }
 9 
10 this.Delay(2000000000);这里在函数类进行调用即可

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM