上传者: 38728624
|
上传时间: 2023-03-26 19:18:17
|
文件大小: 40KB
|
文件类型: PDF
方法一:需要调用win32api,winform、wpf通用
[DllImport(user32.dll)]
public static extern bool GetCursorPos(out POINT lpPoint);
[StructLayout(LayoutKind.Sequential)]
public struct POINT
{
public int X;
public int Y;
public POINT(int x, int y)
{
this.X = x;
this.Y = y;
}
}
方法二:通过调用Win32 API设置