I have an old compaq with a pentium 4. It's running xp and I love it but it's gettin slow. Can I just add just add parts ie motherboard and cpu etc to the cabinet and still use the hard drive with all my programs, os etc etc???
It's not getting any slower, programs are just getting more demanding
The short answer is yes, you can swap out the board and processor for new. But as soon as Windows sees all that new hardware on the new board, it will more than likely crash. You will need to do a clean install of the O/S so Windows can load the necessary drivers and program itself for the hdwr it sees on the new board... and the new processor if it is beyond the Pentium 4's generation.
That of course, brings up another issue. If your copy of XP is an OEM version, it may not allow you to activate it because OEM versions are tied to the original motherboard it was installed on. You may be forced to buy a new license or just buy Windows 7... it is time to upgrade anyway.
Then I would say assemble your upgrade and try for a fresh install of XP on the finished build. It will install fine. If you are allowed to activate it, you are good to go. If not, you can decide to purchase a new license or upgrade your O/S at that point.