buttonName = "btn" + y.ToString() + x.ToString(); Control btn = this.Controls.Find(buttonName, true)[0] as Control; btn.BackColor = System.Drawing.Color.Blue;