You can't take the hard drive from 1 machine and insert it into another and expect Windows to work. Windows uses a hardware profile. This profile is used for 2 things.
1. To install the proper drivers so that the OS can communicate and operate with the hardware properly.
2. Used in activation.
If you change the hardware profile in a major way, such as CPU and mother board changes, then you have to reinstall the OS completely as the hardware profile will no longer match and will not work. Since you took it from an eMachine which uses an OEM copy, you can't do that. OEM copies can not be transferred to another machine. That copy of the OS Died when the mother board died.
Differences between OEM and Retail
That thread explains about the OEM vs Retail aspect. So you have to get yourself a new copy of Windows to install with the hardware. Unless you can find the original copy that came with the IBM and reinstall that.