模拟鼠标点击、自动移动光标等只能用win32 API吗?用net库不行?

解决方案 »

  1.   

    // public const int MOUSEEVENTF_LEFTDOWN = 0x2;
    // public const int MOUSEEVENTF_LEFTUP = 0x4;
    // public const int MOUSEEVENTF_MOVE = 0x1;
    //
    // [System.Runtime.InteropServices.DllImport("user32.dll" , EntryPoint="SetCursorPos")]  
    //  internal extern static int SetCursorPos ( int x , int y ) ;
    // [System.Runtime.InteropServices.DllImport( "user32.dll" , EntryPoint="GetCursorPos" )]
    // internal extern static int GetCursorPos( ref Point lpPoint );
    //
    // [System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint="mouse_event")]
    // public static extern void mouse_event (int dwFlags,int dx,int dy,int cButtons,int dwExtraInfo);就这么几个函数很麻烦么?
      

  2.   

    到现在为止没有找到,我也是用Win 的DLL.
    http://blog.csdn.net/chengking/archive/2005/10/07/496715.aspx