First of all... Welcome to the forums.
Now.... as Greg asked, we need to know if it's audio, midi or both.
I'll take a guess and say you are recording on a factory machine..... using the sound card from the factory and probably MME drivers. You are likely experiencing latency (a delay) in the midi where it's delayed behind the audio or not synced with other midi tracks. Nothing you do will fix it. Yes?
If so..... factory sound cards and MME drivers are notorious for latency. You can try switching drivers and let the wave profiler run after the change.... but I think ultimately, a third party sound card solution is the best.
Once you record something, whether it's audio tracks or midi tracks, you should not have to edit it to get it synced to the rest of the music. It should play back exactly how you recorded it....totally synced to the rest of the music.
All of us here use either a firewire or USB based external interface running ASIO drivers. With the proper soundcard/interface & ASIO driver combo, the software you have will run exactly like you expect it to. Everything running synced up, no latency, and ready to capture the ideas and music you play.
we'll see if we can help with a few suggestions, but for now, let us know about the tracks and the computer and sound card as well as the drivers you are using.