I know that if you change out too many parts at one time, then reinstall, Windows thinks you're trying to install it on a totally new computer and won't let you finish the install. There's some sort of validation process involving calling Microsoft and getting them to remote activate the OS. I'm not sure if this also works for moving your old Win7 off a junked computer to a new computer.
My husband builds my computers, and twice I've upgraded my OS. Both times I bought OEM copies from local stores that also sell computer parts. There's supposed to be a requirement that you have to buy actual parts at the same time, but the first place let me buy XP along with a memory card and the second place didn't make me buy anything additional when I got Win7. (Though they offer some very cheap items, so if they'd been strict I could have gotten a $5 keyboard or something.)
OEM versions are a fraction of the price of the retail copy.