nick 0

nick 0

  • NA
  • 18
  • 0

Problems using DX Surfaces draw methods

Sep 30 2004 8:10 AM
Hi I am at the final stages of a game and have just put in the score and a bit of drawing in using a Direct Draw surface and the DrawText and DrawBox methods. All works fine for a while but after a length of time I get the following exception. System.ArgumentNullException: Value cannot be null. at Microsoft.DirectX.DirectDraw.Surface.set_ForeColor(Color value) at BCQuest.GameManager.drawScores(Surface surface) in c:\documents and settings\nick\my documents\visual studio projects\bcquest\gamemanager.cs:line 273 Does anyone know what could be causing this. I can't see why this would happen as the game seems to run for a good 10 minutes before getting upset!!! The surfaces are all ok. Should I be doing a bit of memory management after using the fonts and colors to perfrom this operation?? Yours hopefully Nick James

Answers (4)