private void GameWindow_Paint(object sender, PaintEventArgs e) { Bitmap curBitmap = new Bitmap(ClientRectangle.Width, ClientRectangle.Height); Graphics g1 = Graphics.FromImage(curBitmap); Graphics g = e.Graphics; //Draw the astorides foreach (Asteroid tempAsteriod in LevelData.Asteroids) { tempAsteriod.Draw(g1); } if (TheShip != null) { LevelData.theFinish.Draw(g1); TheShip.Draw(g1); //Draw the ship UI GameUI.Draw(g1, TheShip, TimerVal, PlayerCommander); } ; //Draw the back image to the front g.DrawImage(curBitmap, 0, 0); }