The only time you won't be able to have windows 7 installed and then change a motherboard and it work on the new board is if you get a prebuilt system with an OEM version of windows on.
If you purchase the program and insatll it it will 99% of the time work if you change your motherboard and not be bound to the mobo.
Occasionally though, very rarely, the key will be bound to the motherboard, but if that happens you can just contact microsoft, they will deactivate your code and give you a brand new one