Wait one second in running program

前端 未结 10 1221
暗喜
暗喜 2020-12-08 12:30
dataGridView1.Rows[x1].Cells[y1].Style.BackColor = System.Drawing.Color.Red;
System.Threading.Thread.Sleep(1000);

İ want to wait one second before

10条回答
  •  没有蜡笔的小新
    2020-12-08 13:06

    I feel like all that was wrong here was the order, Selçuklu wanted the app to wait for a second before filling in the grid, so the Sleep command should have come before the fill command.

        System.Threading.Thread.Sleep(1000);
        dataGridView1.Rows[x1].Cells[y1].Style.BackColor = System.Drawing.Color.Red;
    

提交回复
热议问题