using System.Runtime.InteropServices;[DllImport("user32.dll", EntryPoint="SetCursorPos")] public static extern int SetCursorPos ( int x, int y );private void button1_Click(object sender, System.EventArgs e) { SetCursorPos(0, 0); }
[DllImport("user32.dll", EntryPoint="SetCursorPos")] public static extern int SetCursorPos ( int x, int y );老大这段代码应该放在哪里? 小弟是菜鸟呢!
System.Windows.Forms.Cursor.Position = new Point(x,y);
public static extern int SetCursorPos (
int x,
int y
);private void button1_Click(object sender, System.EventArgs e)
{
SetCursorPos(0, 0);
}
public static extern int SetCursorPos (
int x,
int y
);老大这段代码应该放在哪里?
小弟是菜鸟呢!