using System.Runtime.InteropServices;
//在 类中 引入dll
[DllImport("user32.dll", EntryPoint = "SetCursorPos")]
private static extern int SetCursorPos(int x, int y);
private void attachToolStripMenuItem_Click(object sender, EventArgs e)
{
SetCursorPos(100,100);
}
c#中使用win32API
最新推荐文章于 2023-05-09 22:12:07 发布