请问各位大哥:
    怎样获取某个控件在整个WINDOW屏幕中的切实位置?因为我发现控件的location属性
     并不是其在window屏幕中的切实位置来的,可能是相对于整个winform窗口的相对位置吧?

解决方案 »

  1.   

    use 
      System.Windows.Forms.Screen
      

  2.   

    this.PointToScreen(button1).X; //横
    this.PointToScreen(button1).Y; //纵
      

  3.   

    以下这样也行,以下是把控件的内容保存到图片中
    Size size = new Size(panel1.Width, panel1.Height);//拿到PANEL大小          Image  img = new Bitmap(size.Width,size.Height);//定义一张相同大小的图片            Graphics g = Graphics.FromImage(img);//拿到图片的绘图对象            g.CopyFromScreen(this.Location.X + SystemInformation.FrameBorderSize.Width + panel1.Location.X, this.Location.Y + SystemInformation.CaptionHeight + SystemInformation.FrameBorderSize.Height + panel1.Location.Y,0,0,size); //开始捕捉屏幕到图片中
      

  4.   

    System.Windows.Forms.Control.MousePosition
    不是很了解,帮你看了下
    你看下Windows.Forms下的属性有没有适合你的