when I click, it updates the position that my highlighted tile is at, however I have to call this.Refresh();, and it lags because I am drawing the whole thing again, any way I can refresh 'only' a part of it?Code:private void Form1_Paint(object sender, PaintEventArgs e) { for (int i = 0; i < currentGrid.GetUpperBound(0); i++) { for (int k = 0; k < currentGrid.GetUpperBound(1); k++) { Bitmap bmp = new Bitmap(images[currentGrid[i, k]]); e.Graphics.DrawImage(bmp, new Point(k * gridWidth, i * gridHeight)); bmp.Dispose(); bmp = null; } } HighlightTile(e); }




Reply With Quote