The pointer position behaves incorrectly when you use RDC to connect to a terminal server from a Windows Vista-based or Windows Server 2008-based client computer, and you run an application that calls the “SetCursorPos” function
You develop an application that uses the SetCursorPos function to change the pointer position on the screen. Then, you use Remote Desktop Connection (RDC) to connect to a Windows-based terminal server from a client computer that is running Windows Vista or Windows Server 2008. When you run the application in the Terminal Services session, the pointer position behaves incorrectly.
This problem may occur when you try to move the pointer over the edge of the Remote Desktop window.
For more information on this issue, including potential causes, workarounds, and resolutions, see: Microsoft KB Article KB960470.