I recommend you not spend any money on your present system if it works well. Here's why:
First, you'll need a better power supply first before changing anything else. Expect to spend at least $40 for a decent brand with at least 400 watts. Your compaq power supply is probably a 250w model, barely adequate for what you have now.
Second, if you're using the windows installation that came with your system, it won't load windows with a non compaq motherboard. A small bios file tells windows you have a compaq board; it won't load windows with any other brand.
Third, decent video cards barely fit in the compaq case; some are too long.
Fourth, buying more ddr2 isn't recommended; it costs more than ddr3, and if your motherboard fails, you'll need to buy ddr3 to run any of the newer motherboards.
If you still want to upgrade, get only the power supply and video card and keep your old stuff. The new (small to medium size) video card and power supply can be used in your next system. And you can put the old power supply back in if you sell the system intact and let the buyer use the onboard video.