【C#】MouseEventArgs事件参数获取鼠标的位置

时间:2015-11-07 10:41:26   收藏:0   阅读:1296
        private void Form1_MouseDown(object sender, MouseEventArgs e)
        {
            string x = e.X.ToString(); //x坐标
            string y = e.Y.ToString(); //Y坐标
            MessageBox.Show("X:"+x+"  Y:"+y);
        }

  

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!