您的位置:首页 > 编程语言 > C#

c# 获取全屏 中鼠标焦点的位置坐标

2013-09-15 19:26 274 查看
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Threading;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
///获取桌面大小
//Rectangle rect = System.Windows.Forms.SystemInformation.VirtualScreen;
//int width = rect.Width;
//int height = rect.Height;

///循环取点
while (true) {
Point p = System.Windows.Forms.Cursor.Position;
Console.WriteLine(p.X + ":" + p.Y);
Thread.Sleep(100);
Console.Clear();
}
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: