直接使用Cursor.Position就是,不要调用API了。

解决方案 »

  1.   

    你看看帮助是如何写的。Cursor.Position 属性  [C#]请参见
    Cursor 类 | Cursor 成员 | System.Windows.Forms 命名空间 | Point | Cursor 成员(Visual J# 语法) | C++ 托管扩展编程 
    要求
    平台: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 系列
    获取或设置光标位置。[C#]
    public static Point Position {get; set;}
    属性值
    代表光标位置的 Point(采用屏幕坐标)。
      

  2.   

    文档理由说明的,Cursor.Position
      

  3.   

    [DllImport("user32.dll", EntryPoint="GetCursorPos")]
    public static extern int GetCursorPos (
    ref POINTAPI lpPoint
    );[StructLayout(LayoutKind.Sequential)]
    public struct POINTAPI {
    public int x;
    public int y;
    }
      

  4.   

    u can download apiExplorer from:http://zpcity.com/arli