dataGridView1.Rows[x1].Cells[y1].Style.BackColor = System.Drawing.Color.Red; System.Threading.Thread.Sleep(1000);
İ want to wait one second before
Maybe try this code:
void wait (double x) { DateTime t = DateTime.Now; DateTime tf = DateTime.Now.AddSeconds(x); while (t < tf) { t = DateTime.Now; } }