在运行程序中等待一秒钟 [英] Wait one second in running program
本文介绍了在运行程序中等待一秒钟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
dataGridView1.Rows[x1].Cells[y1].Style.BackColor = System.Drawing.Color.Red;
System.Threading.Thread.Sleep(1000);
İ想要等待一秒钟,然后用此代码打印我的网格单元,但是它不起作用。我该怎么办?
İ want to wait one second before printing my grid cells with this code, but it isn't working. What can i do?
推荐答案
是暂停了,但是您看不到单元格中出现红色吗?试试这个:
Is it pausing, but you don't see your red color appear in the cell? Try this:
dataGridView1.Rows[x1].Cells[y1].Style.BackColor = System.Drawing.Color.Red;
dataGridView1.Refresh();
System.Threading.Thread.Sleep(1000);
这篇关于在运行程序中等待一秒钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文