Point p = Cursor.Position;
int x = p.X;
int y = p.Y;
label1.Text = String.Format("Mouse X:{0}, Mouse Y :{1}", x, y);
转载于:https://www.cnblogs.com/Laro/archive/2011/03/24/1994012.html
本文介绍了一种在C#中获取鼠标当前位置的方法,并通过Label控件显示鼠标的X和Y坐标。该方法使用Cursor.Position属性来读取当前鼠标指针的位置。
转载于:https://www.cnblogs.com/Laro/archive/2011/03/24/1994012.html
3174

被折叠的 条评论
为什么被折叠?
