dataGridView1.Rows[x1].Cells[y1].Style.BackColor = System.Drawing.Color.Red;
System.Threading.Thread.Sleep(1000);
© 想要在使用此代码打印我的网格单元之前等待一秒钟,但它不起作用。我能做什么?
最佳答案
是否正在暂停,但您没有看到红色出现在单元格中?试试这个:
dataGridView1.Rows[x1].Cells[y1].Style.BackColor = System.Drawing.Color.Red;
dataGridView1.Refresh();
System.Threading.Thread.Sleep(1000);
关于c# - 在运行程序中等待一秒钟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10458118/