【发布时间】:2011-05-27 13:14:20
【问题描述】:
我是 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 窗体或 aspx 页面中获取鼠标坐标吗?
-
@kalyan .. 我想在 Windows 窗体上获取位图坐标(不知道它们是否称为鼠标坐标)。有显示位图的扩展图片框,我想要弹出窗口(工具提示)显示在那里。
标签: visual-studio-2010 c#-4.0 bitmap tooltip pixel