需要调用win32api,winform、wpf通用

代码如下:

 1 [DllImport("user32.dll")]
 2 public static extern bool GetCursorPos(out POINT lpPoint);
 3 
 4 [StructLayout(LayoutKind.Sequential)]
 5 public struct POINT
 6 {
 7     public int X;
 8     public int Y;
 9     public POINT(int x, int y)
10     {
11         this.X = x;
12         this.Y = y;
13     }
14 }

 http://www.cnblogs.com/sosoft/

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-24
  • 2021-06-24
  • 2021-10-03
猜你喜欢
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2022-01-09
  • 2022-12-23
  • 2021-05-30
相关资源
相似解决方案