首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

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

2013-09-16 
c# 获取全屏 中鼠标焦点的位置坐标using Systemusing System.Collections.Genericusing System.Linqusi

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

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();            }        }    }}

热点排行