-
?获取鼠标点击时的位置的VS2010 C#代码】
资源介绍
Microsoft Visual Studio 2010做的C#获取鼠标点击时的位置实例,主要代码:
private void Form1_MouseClick(object sender, MouseEventArgs e)
{
Point pointClicked = e.Location;
int iX = pointClicked.X;
int iY = pointClicked.Y;
string sPosition = "(" + iX.ToString() + "," + iY.ToString() + ")";
label1.Text = sPosition;
}