> I tried to put the function to move on the OnKeyDown of teh form but it doesn't execute at all.
The OnKeyDown event of the form will only fire if there is no other component on the form that has focus. If there is another component that has focus, the OnKeyDown event of that component fires, not the OnKeyDown event of the form. I suspect that this is what is happening.
Good Luck.