注释感觉已经很清楚了,有不懂的欢迎评论
1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 using System.Runtime.InteropServices; 8 using System.Text; 9 using System.Threading; 10 using System.Threading.Tasks; 11 using System.Windows.Forms; 12 13 namespace WindowsFormsApp1 14 { 15 public partial class Form1 : Form 16 { 17 public Form1() 18 { 19 InitializeComponent(); 20 this.Hide(); 21 } 22 /// <summary> 23 /// 引用user32.dll动态链接库(windows api), 24 /// 使用库中定义 API:SetCursorPos 25 /// </summary> 26 [DllImport("user32.dll")] 27 private static extern int SetCursorPos(int x, int y); 28 /// <summary> 29 /// 移动鼠标到指定的坐标点 30 /// </s
C#实现模拟鼠标点击事件(点击桌面的其他程序 )
最新推荐文章于 2024-10-21 11:37:34 发布

最低0.47元/天 解锁文章
4897





