编程将鼠标定位到某处,有的时候,鼠标像是有“惯性”似的总是“走过头”!!我用如下代码,反复定位,勉强能准确定位        /// <summary>
        /// 用负反馈技术使鼠标准确的移动到指定位置
        /// </summary>
        /// <param name="p">到指定位置</param>
        /// <returns></returns>
        public static int FfkMouseMoveTo(Point p, byte MouseKeyName, MouseMoveToDelegate pMMouseMoveTo)
        {
            int result = 0;
            int intcalc = 0;
            Point getpont = new Point(0, 0);
            if (p.X != -1)
            {
                while (p != getpont)
                {
                    intcalc++;
                    Utils.DelayMilliseconds(500);
                    //LkfWin32API.SetCursorPos(p.X, p.Y);
                    result = pMMouseMoveTo(MouseKeyName, p.X, p.Y);// LkfUsbAPI.MMouseMoveTo(UsbMKutils.ConvertMouseKeyNameToAsciiCode(MouseKeyName.up.ToString()), p.X, p.Y);
                    Utils.DelayMilliseconds(500);
                    getpont = LkfWin32API.LkfGetCursorPos();
                    if (intcalc > 30)
                    {
                        throw new Exception("鼠标无法准确定位");
                    }
                }
            }
            return result;
        }
我会一点c#。以前用过按键精灵,好像也有这个问题,最严重的的时候反复定位30次也无法准确定位!!