You should be using timeGetTime (declared in MMSystem.pas) instead of GetTickCount.