That computer came with 256 MB or memory. The memory will have to be upgraded to at least 512 MB if it has not been. Also, you may have to install Windows XP Service Pack 2 if that has not been done, as that machine came with an early version of Service Pack 1. There are a very large number of downloads since February 2004 for that machine. You may need to upgrade th BIOS and run many of the other downloads from the HP web site. I would install all of them.
Finally, check the Device Manager in Hardware in System at the Control Panel to look for devices flagged with a yellow or red mark... after you have downloaded everything.
Do not discount the idea that the video card itself is bad. That happens sometimes.