GDI+ 相对form窗口的坐标和相对于显示器的屏幕坐标的转换

private void Form1_MouseDown(object sender, MouseEventArgs e)//获取的是相对form窗口的坐标。(延伸一下就是相对于绑定事件的控件的坐标)
  {
  int x = e.X;
  int y = e.Y;
  }
private void Form1_DoubleClick(object sender, EventArgs e)//这样是获取相对显示器的屏幕坐标
  {
  int x = Control.MousePosition.X;
  int y = Control.MousePosition.Y;  
  }


this.Location; // 窗体所在坐标
this.PointToScreen(new Point(0, 0)); // 客户区坐标转换为屏幕坐标
this.PointToClient(new Point(0, 0)); // 屏幕坐标转换为客户区坐标

原文地址:https://www.cnblogs.com/cappuccino/p/1884663.html