First of all, welcome to the Chief Delphi Community. There are many threads discussing this topic, but it is ok, most new members dont know where to look or how to use the search feature to its full extent.
Before doing anything... read this.
http://www.chiefdelphi.com/forums/sh...ad.php?t=31774
And here are some threads that may answer your question.
Neat Discussion on Optical mouse navigation systems
http://www.chiefdelphi.com/forums/sh...highlight=auto
FRC Programming FAQ's
and the best one of all... the Chief Delphi
Programming White Papers.