Hi,
If you are doing development on one machine and then want to migrate the devlopment on another machine then you just copy the XSN file with the Infopath project folder for that form to the new machine. As you said that you have some code in the loading event. After moving code and form to new machine, Open the infopath form.
Tools --> Options --> Design Tab --> project location for visual basic and C# code:
here check that your path for the code behind is pointing to right folder.
Hope it will help you.
Bhavesh