Visual studio 2010 如何通过点击获得像素的坐标

Visual studio 2010 如何通过点击获得像素的坐标,visual-studio-2010,c#-4.0,bitmap,tooltip,pixel,Visual Studio 2010,C# 4.0,Bitmap,Tooltip,Pixel,我是C和.net的新手。我想通过点击得到像素的坐标,这样它就会显示在工具提示中!!我有一个获取顶点的代码,但我不知道如何与鼠标单击关联 public class Vertex { public Vertex(int i, int j) { this.X = i; this.Y = j; } public int X { get; set; } public

我是C和.net的新手。我想通过点击得到像素的坐标,这样它就会显示在工具提示中!!我有一个获取顶点的代码,但我不知道如何与鼠标单击关联

public class Vertex
    {
        public Vertex(int i, int j)
        {
            this.X = i;
            this.Y = j;
        }
         public int X { get; set; }
         public int Y { get; set; }
         public string ToString()
        {
            return string.Format("({0}/{1})", this.X, this.Y);
        }
    }  
在Windows窗体中,处理鼠标按下事件。的msdn页面提供了在工具提示中显示坐标的示例

编辑:
只是一个要记住的东西。MouseEventArgs中的坐标可能因您正在处理的事件而异。请参阅前面引用的mouse event args msdn页面。在某些情况下,位置是相对于控件的,在另一些情况下是相对于窗体的,在其他情况下是相对于屏幕的。

do,你想在Windows窗体或aspx页面中获取鼠标坐标吗?@kalyan。。我想获得位图坐标Donno,无论它们在windows窗体上是否被称为鼠标坐标。在显示位图的扩展图片框中,我想在那里显示弹出窗口工具提示。