日期:2014-05-17 浏览次数:22532 次
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern void keybd_event(int bVk, byte bScan, int dwFlags, int dwExtraInfo);   
 static void Main(string[] args)
        {
....
   //发送ctrl+c
            keybd_event(Convert.ToInt32(System.Windows.Forms.Keys.ControlKey), 0, 0, 0);
            keybd_event(Convert.ToInt32(System.Windows.Forms.Keys.C), 0, 0, 0);
           ...
        }