In theory, it should work. However always when swapping out hardware without a reinstall there are big chances of incompatibilities such as drivers and stuff. The chances are you will have to re-purchase Vista because you will no longer be able to activate it since you've swapped out almost everything. Vista will just detect it as a new machine and refuse to activate.
There may be a problem that the HP recovery discs will look at the hardware and think "hey, this isn't a HP machine" and just refuse to install. In that case you'll have to find yourself a Vista disc. The only way to find out is try it.
There may be a problem that the HP recovery discs will look at the hardware and think "hey, this isn't a HP machine" and just refuse to install. In that case you'll have to find yourself a Vista disc. The only way to find out is try it.